Open DavidVII opened 10 years ago
I am also having this issue. The only thing I can find on it is this: http://stackoverflow.com/questions/24030907/spork-0-9-2-and-rspec-3-0-0-uninitialized-constant-rspeccorecommandline-n
running bundle exec rspec --drb spec getting error "Exception encountered: #
This is an issue with Spork itself (which spork-rails depends on). The reason is that RSpec::Core::CommandLine was removed in Rspec3 and spork uses it.
Spork isn't really maintained anymore, so the version on rubygems.org isn't up to date with master (where this problem has been fixed). Spork-rails doesn't track the spork gem from master. However, if you explicitly tell bundler to get Spork from github, it'll use it instead of rubygems. So in your gemfile you have:
gem 'spork-rails'
Change it to:
gem 'spork', github: 'sporkrb/spork'
gem 'spork-rails'
For me this fixed the issue and tests will run. However the result (pass/fail) is not returned to the console (where you ran rspec --drb spec
). You can still see the result in the Spork server, though. This works okay for me. I run specific tests (by line number) from sublime-text using the ruby-test plugin and then switch to terminal to see the result.
With modern versions of rails you should be using Spring, of course. If you're stuck working on a old version of rails, this is a simple workaround.
Tried setting up, but for some reason the files weren't loading properly. I installed everything just as before and included the Spork prefork in the
rails_helper.rb
file sincespec_helper.rb
doesn't have anything anymore (at least mine doesn't).Anyone else have any issues with this?