ruby - Rake dependency not executing but invoke works -
i've been trying run rake db:test:clone_structure
, keeps failing rebuild database. looked @ task itself:
task :clone_structure => [ "db:structure:dump", "db:test:load_structure" ]
when run trace, i've noticed db:test:load_structure
isn't getting executed:
$ rake db:test:clone_structure --trace ** invoke db:test:clone_structure (first_time) ** invoke db:structure:dump (first_time) ** invoke environment (first_time) ** execute environment ** execute db:structure:dump ** invoke db:test:purge (first_time) ** invoke environment ** execute db:test:purge ** execute db:test:clone_structure
now, when change clone_structure
task invoke load_structure
...
task :clone_structure => [ "db:structure:dump", "db:test:load_structure" ] db_namespace["test:load_structure"].invoke end
...everything works!
$ rake db:test:prepare --trace ** invoke db:test:clone_structure (first_time) ** invoke db:structure:dump (first_time) ** invoke environment (first_time) ** execute environment ** execute db:structure:dump ** invoke db:test:purge (first_time) ** invoke environment ** execute db:test:purge ** execute db:test:clone_structure ** invoke db:test:load_structure (first_time) ** invoke db:test:purge ** execute db:test:load_structure ** invoke db:structure:load (first_time) ** invoke environment ** invoke db:load_config (first_time) ** execute db:load_config ** execute db:structure:load
what possibly causing behavior? i'm using rails 3.2.14 , rake 10.1.0.
updated: upgraded rails 3.2.13 3.2.11 , it's still problem.
updated second: upgraded rails 3.2.14 , rake 10.1.0 , it's still problem
i there. far know rake convention be...
task :clone_structure => [ "db:structure:dump", "db:test:load_structure" ] rake::task["clone_structure"].invoke end
otherwise, prefer...
task :clone_structure rake::task["db:structure:dump"].invoke rake::task["db:test:load_structure"].invoke end
Comments
Post a Comment