Things have starting moving in the right direction, however,
Rake::Task['db:migrate VERSION=0'].invoke was aborted. What could have
caused this? However, when I didrakedb:migrate VERSION=0 on the
console ,I got the expected result.
Once again, the actual error would be helpful. Be sure to include
that with any other future problems.
However, it seems that you're thinkingRake::Task[] works like
system(). This is not the case,Rake::Task[] only looks up the
corresponding task with that name. It is likely that there is noRake::Task defined with the name 'db:migrate VERSION=0'.
The VERSION=0 part is not a part of the task name, but an environment
variable thatRakereads from in the db:migrate task. I'm not sure of
the recommended method of setting environment variables, when using
theRake::Task[].invoke method.
I cannot test at the moment:
ENV['VERSION'] = 0Rake::Task["db:migrate"].invoke
but I think that should work.
HTH,
Michael Guterl