tags:

views:

15

answers:

1

Hello there, I need to execute a rake task in a windows machine and unfortunately to do so I have to open a shell. How can I close it once the task has been completed?

system('start rake db:MyTask')

Thanks,.

A: 

maybe something like

 system('start rubyw -S rake db:MyTask')

are you running this from the "run" box? Why is a window popping up?

rogerdpack
Thanks for your reply. I run it from a Rails app an the only way rake tasks work in Windows OS is in a Shell (the shell pops up by itself when the task starts). with system('start rubyw -S rake db:MyTask') the task doesn't start. I also tried system('start -S rake db:MyTask') and system('start rake db:MyTask -S') but neither one work.
macsig
oh ok so I assume this isn't working? probably because of that pesky start command. Try what I suggested without "start" perhaps, or see http://www.ruby-forum.com/topic/213521#new
rogerdpack