On Tue, Jan 6, 2009 at 11:07 AM, Ryan Mckenzie <
[email protected]> wrote:
>
> Hello everyone,
>
> I'm using InstantRails 2.0 on a Windows XP 32 bit system.
>
> I'm developing a Rails application where I would like to execute a .bat
> file
>
> I've had a look around and this piece of code is suppose to do the trick
> but it does not seem to work.
>
> system('path/to/file.bat')
>
> Do I need to have some plugins/gems installed?
>
> Regards,
>
> McKenzie.
>
No, the #system method is built into Ruby.
Can you execute your #system call from the Rails console?
$ script/console
>> system("/full/path/to/file.bat")
...works for me.
--wpd
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---