Trying to use rspec, but getting an error that rspec-core 2.2.1 has been activated, but my Gemfile requires rspec-core 2.1.0

后端 未结 6 840
没有蜡笔的小新
没有蜡笔的小新 2021-02-08 03:35

I\'ve update my gems. I\'ve created a sample Rails app and have the following in my Gemfile:

source \'http://rubygems.org\'

gem \'rails\', \'3.0.3\'
gem \'sqli         


        
6条回答
  •  独厮守ぢ
    2021-02-08 04:11

    A combination of Sam Ritchie's and Alexey's solutions helped me here. In the end I had to:

    bundle update rspec
    bundle update rspec-rails
    sudo gem uninstall rspec-mocks
    sudo gem uninstall rspec-expectations
    sudo gem uninstall rspec-core
    

    (prompts for versions if none are entered)

    As Alexey says, use this to see which versions are too high:

    gem list rspec
    

    (Would vote for you Alexey, but apparently I don't have enough of a "reputation" on stack.)

提交回复
热议问题