Open belgoros opened 12 years ago
I get this same problem. Have you managed to work around this yet?
It seems that spork is not supported by Windows for the moment, that's whay I abandonned it for development on Windows box. The rest is being done on Ubuntu.
Hmm...I am getting this on Mac OS 10.6. Anyone have an idea of why this would be on a mac?
For me I am running:
spork rspec --bootstrap
and I get
``undefined method
inject' for Gem::Specification:Class (NoMethodError)
/Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/lib/spork/gem_helpers.rb:5:in latest_specs' /Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/lib/spork/gem_helpers.rb:16:in
find_files_using_latest_spec'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/lib/spork.rb:101:in detect_and_require' /Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/lib/spork/test_framework.rb:167:in
<top (required)>'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/lib/spork/runner.rb:49:in find_test_framework' /Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/lib/spork/runner.rb:57:in
run'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/lib/spork/runner.rb:10:in run' /Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/gems/spork-1.0.0rc2/bin/spork:10:in
<top (required)>'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/bin/spork:19:in load' /Users/dc/.rvm/gems/ruby-1.9.2-p180@launch3/bin/spork:19:in
actually, turns out all I needed was to run bundle exec spork rspec --bootstrap
instead
Oh, yes, I didn't think about that. I recently marked it too that for some things I had to prefix with 'bundle exec' to make them run. Thanks for pointing it out.
I'm getting the same error with a Rails project here on OS X. Running without bundle exec always fails. With Guard 0.9.0rc9 it ran fine.
it is necessary in general to prefix commands such as rake or rspec with bundle exec so that the programs run in the exact gem environment specified by the Gemfile. (For technical reasons, the only exception to this is the rails command itself.). You can eliminate the use of 'bundle exec as described By Michael Hartle here: http://ruby.railstutorial.org/chapters/static-pages#sec:eliminating_bundle_exec
I followed the instructions on https://github.com/sporkrb/spork/wiki/WindowsSupport where the link to Windows directions is broken: https://github.com/timcharper/spork/wiki/.
After running
I got the above exception:
In the Gem file:
It happened on Windows XP SP3, Ruby 1.9.2, Spork (1.0.0rc2 x86-mingw32). Any idea ?