Hi Janus,

On Mon, Sep 22, 2008 at 8:51 AM, janus <emekamicro / gmail.com> wrote:
>> ENV['VERSION'] = 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["......"]
>
Great, I'm glad you got things working.

system is a class method that belongs to Kernel.  In order to find out
what it does, we can run the following:

macbook:~ michaelguterl$ ri Kernel.system

---------------------------------------------------------- Kernel#system
     system(cmd [, arg, ...])    => true or false
------------------------------------------------------------------------------------------------------
     Executes _cmd_ in a subshell, returning +true+ if the command was
     found and ran successfully, +false+ otherwise. An error status is
     available in +$?+. The arguments are processed in the same way as
     for +Kernel::exec+.

        system("echo *")
        system("echo", "*")

------------------------------------------------------------------------------------------------------

Moving along from http://rake.rubyforge.org

Rake::Task#[](task_name)

Return a task with the given name. If the task is not currently known,
try to synthesize one from the defined rules. If no rules are found, but an
existing file matches the task name, assume it is a file task with no
dependencies or actions.

So Kernel.system() executes a command in a subshell and Rake::Task#[]
retrieves the task given name.  I hope that clarifies things a bit.

Michael Guterl