[rspec-users] Can you add an option to select the ruby interpreter for rake task?

Chiyuan Zhang pluskid at gmail.com
Tue Apr 8 11:53:14 EDT 2008

Hi all,

My problem is that I've installed both ruby 1.8 (as ruby) and
ruby 1.9 (as ruby1.9) on my system. I use spec/rake/spectask for
my Rakefile. But the generated command is

ruby -I.. blabla

it should be "ruby1.9 -I... blabla", but after look at the code
of spectask.rb, I found this line:

       ==>    cmd = "ruby "

              rb_opts = ruby_opts.clone
              rb_opts << "-I\"#{lib_path}\""
              rb_opts << "-S rcov" if rcov
              rb_opts << "-w" if warning

The "ruby" is hard-coded into it. May I request this to be an
customizable option so that I can set it to "ruby1.9"?


More information about the rspec-users mailing list