Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

rake test wipes out the entire development db

#757

this happens in rails-2-1-stable, using sqlite3 adaptor, I've applied a temp fix, but i am not sure whether it's the right thing to do.

Thanks guys

Reported by leiyou · August 4th, 2008 @ 07:51 PM

State: duplicate
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Ryan Bates
    Ryan Bates

    Are you certain this problem isn't specific to your application? Check your database.yml file to make sure the test db is different from the development one.

    Also make sure this is at the top of your test_helper file to ensure you're running in the test environment.

    ENV["RAILS_ENV"] = "test"
    

    August 4th, 2008 @ 11:59 PM

  2. leiyou
    leiyou

    Hi Ryan,

    the test db is certainly different from the development, and

    there is a ENV["RAILS_ENV"] = 'test' on top of test_helper.rb.

    the problem happens in the rake task db:test:prepare I believe.

    August 5th, 2008 @ 02:23 PM

  3. leiyou
    leiyou

    also, i am on the gem version of rake 0.8.1

    August 5th, 2008 @ 02:27 PM

  4. Chris Gaffney
    Chris Gaffney

    I've run into the exact same problem using Mysql. It looks like it is only an issue on the 2.1 stable branch. The posted change from db:schema:load to db:test:clone works for me.

    Offending commit: http://github.com/rails/rails/co...

    August 18th, 2008 @ 09:01 PM

  5. Chris Gaffney
  6. Tarmo Tänav
    Tarmo Tänav
    • State changed from new to duplicate

    August 22nd, 2008 @ 09:24 PM