Rafael Sales
2013-Feb-28 03:13 UTC
Rake tasks db:test:prepare cannot be executed in the same task of db:reset or db:migrate
Hey all, I''m trying to create a task that prepare the environment to start programming. To do so, I created a task like this *task :setup_env => [''db:reset'', ''db:migrate'', ''db:test:prepare'']* and observed that after execute * rake setup_env*, it never execute db:test:prepare properly. In order to get the schema cloned to test db, I have to execute rake *db:test:prepare*manually after *rake setup_env* I also noticed that if I also write the task like *task :setup_env => [''db:reset'', ''db:test:prepare''] *or *task :setup_env => [''db:migrate'', ''db:test:prepare'']* it still skips db:test:prepare. Instead of using task dependency, I also tried executing Rake::Task[''db:test:prepare''] and it doesn''t execute as well. Does anyone have an idea? Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/tzBwEfv4HLEJ. For more options, visit https://groups.google.com/groups/opt_out.
Maybe Matching Threads
- rake db:test:prepare causes error
- rake:db:prepare Mysql::Error: #42000BLOB/TEXT column ' used in key specification without a length
- rake db:test:prepare
- rake db:redo & rake migrations:reset - or how to cope with the change of db:reset
- anyone able to explain logic behind "rake spec" startup (e.g. db:test:prepare => abort_if_pending_migration => invoke environment => etc etc)