spork 0.9.2 and rspec 3.0.0 = uninitialized constant RSpec::Core::CommandLine (NameError)

前端 未结 5 1724
醉酒成梦
醉酒成梦 2020-12-29 05:11

Im using spork 0.9.2 and rspec 3.0.0. When trying to run test rspec --drb I have an exception

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-29 06:13

    Like @lx00st said:

    The reason is that RSpec::Core::CommandLine was removed in Rspec3

    The spork gem hasn't been updated in rubygems.org. However, the fix has been merged into spork's master branch on github. You can grab it by telling bundler that you'd like to get spork from github (master) instead of rubygems.org. So do this:

    This has been fixed on spork's master branch. Simple solution:

    gem 'spork', github: 'sporkrb/spork', branch: 'master'
    

    If you're using spork-rails, just require spork via github before requiring spork-rails in your gemfile. For more info on this, see my comment here:

    https://github.com/sporkrb/spork-rails/issues/26

    Edit: added branch: 'master'

提交回复
热议问题