When I run bundle exec rspec spec/
on my Windows 7 64bit system, I receive the following error:
invalid switch in RUBYOPT: -F (RuntimeError)
I'm running ruby 1.9.2p136 (2010-12-25) [i386-mingw32] (installed in c:\Program Files (x86)\Ruby192), and bundler 1.0.15 (installed as a ruby gem).
Any clues on how to fix this issue?
Thanks,
Ben
Bundler doesn't like the fact that Ruby's path contains spaces.
To fix the problem, I edited runtime.rb (in %RUBYDIR%\lib\ruby\gems\1.9.1\gems\bundler-1.0.15\lib\bundler), changing line 147 (inside def setup_environment
) from:
rubyopt.unshift "-I#{File.expand_path('../..', __FILE__)}"
to:
rubyopt.unshift "\"-I#{File.expand_path('../..', __FILE__)}\""
This surrounds the entire option with quotes so that Ruby interprets it as a single option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With