Linux Archive

Linux Archive (
-   Ubuntu User (
-   -   What should rake db:test:clone do? (

Colin Law 09-25-2010 01:14 PM

What should rake db:test:clone do?
On Rails 2.3.8 I expected rake db:test:clone to make a complete copy
of the development db as the test db. Having tried it, however, it
seems only to copy the structure.

What I am actually trying to achieve is to make an sqlite copy of the
mysql development db as I am moving to a different development machine
and want to use sqlite for development rather than mysql, so I need an
sqlite version of the existing development db. I changed database.yml
so that the test section reads:

adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

and checked that the tests run, which they do.

I then thought that an easy way to get an sqlite version of the
development db was to use rake db:test:create and simply rename
test.sqlite3 as development.sqlite3 ready for use. As I said above,
however, the rake command appears to have constructed an empty test
db. The development section of database.yml is still referencing the
mysql database of course.

Can anyone offer any suggestions?


ubuntu-users mailing list
Modify settings or unsubscribe at:

All times are GMT. The time now is 07:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.