> ENV['VERSION'] =3D 0
>Rake::Task["db:migrate"].invoke
>
> but I think that should work.
>
It worked, I only changed Fixnum 0 to string. Could you explain the
difference between system("rake.....") and Rake::Task["......"]

Janus



On Sep 21, 2:18=A0pm, Michael Guterl <mgut... / gmail.com> wrote:
> On Sun, Sep 21, 2008 at 8:17 AM, janus <emekami... / gmail.com> wrote:
> > Things have starting moving in the right direction, however,
> >Rake::Task['db:migrate VERSION=3D0'].invoke was aborted. What could have
> > caused this? However, when I didrakedb:migrate VERSION=3D0 on the
> > console ,I got the expected result.
>
> Once again, the actual error would be helpful. =A0Be sure to include
> that with any other future problems.
>
> However, it seems that you're thinkingRake::Task[] works like
> system(). =A0This is not the case,Rake::Task[] only looks up the
> corresponding task with that name. =A0It is likely that there is noRake::=
Task defined with the name 'db:migrate VERSION=3D0'.
>
> The VERSION=3D0 part is not a part of the task name, but an environment
> variable thatRakereads from in the db:migrate task. =A0I'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'] =3D 0Rake::Task["db:migrate"].invoke
>
> but I think that should work.
>
> HTH,
> Michael Guterl