Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work with RSpec 3.0 #26

Open
DavidVII opened this issue Jul 9, 2014 · 3 comments
Open

Doesn't seem to work with RSpec 3.0 #26

DavidVII opened this issue Jul 9, 2014 · 3 comments

Comments

@DavidVII
Copy link

DavidVII commented Jul 9, 2014

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 since spec_helper.rb doesn't have anything anymore (at least mine doesn't).

Anyone else have any issues with this?

@angelamancini
Copy link

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

@himadriganguly
Copy link

running bundle exec rspec --drb spec getting error "Exception encountered: #<NameError: uninitialized constant Spec::Core::CommandLine>" and here is my configuration https://gist.github.com/himadriganguly/23ece39c2de746d91186

@benjaminwood
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants