On Wed, May 14, 2008 at 10:05 PM, Dominic Sisneros <[EMAIL PROTECTED]> wrote:
> What is the best way to invoke ruby system commands on a windows box?
>
> desc "Install the merb-more sub-gems"
> task :install_gems do
> gems.each do |dir|
> Dir.chdir(dir){ sh "rake install" }
> end
> end
>
> This fails because it actually needs rake.bat files
>
> If I do the following, it works
>
> rake_cmd = (PLATFORM == "i386-mswin32") ? "rake.bat" : "rake"
> desc "Install the merb-more sub-gems"
> task :install_gems do
> gems.each do |dir|
> Dir.chdir(dir){ sh "#{rake_cmd} install" }
> end
> end
>
> The problem with this is this needs to be done for every ruby/bin command
> that you want to use
>
I replied to your post on merb group, but also copy it here for the
record (and google) ;-)
This is a old a known problem of Ruby on Windows. Thankfully Nobu
committed a fix for it a few weeks back to the ruby svn repository.
ruby-core thread start:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/16517
and more details of this here:
http://blog.mmediasys.com/2008/04/24/contributions-speedup-and-less-quirks-for-us
Regards,
--
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams
_______________________________________________
Rake-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rake-devel