I've just cloned my rails app onto another PC, and I'm having a
problem getting the database set up.
I've tried rake db:migrate, then db:create and also db:reset, but I
keep getting an SQLException "no such table". It seems this is due to
a line in an initializer which accesses one of my tables.
Why do the db:* tasks run the initializers?
Do I need to move any db
code out of initalizers
- if so, where to?
To get you out of the hole I imagine if you manually create the db
(empty) then you will probably be ok.
Colin
This may be helpful... in helping get your initializer code to run "later" so to speak...
http://www.bigbinary.com/videos/2-how-rails-boots
If not, it's an interesting video anyway :)
-philip