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
Rails noob here ... I'm following Michael Hartl's brilliant tutorial ... stuck at layouts
Tried changing rspec & webrat versions as mentioned in this post about rspec/webrat errors to no avail.
For rspec v2.1.0 I get the same error as @user338413.
rspec -v returns 2.2.1
dev machine running ubuntu 10.04
resolved....works with rspec 2.2.0 + webrat 0.7.1, although I would still like to know why
try using bundle update rspec
and bundle update rspec-rails
. your Gemfile.lock
file, located in the root directory, is probably specifying a version number for each gem.
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.)
change the version number from 2.1.0 to 2.2.1 in Gemfile.lock
I got the same issue right now. to fix it try to:
sudo gem uninstall rspec-core -v 2.2.1
bundle update rspec-core
You may need to do that for other dependent gems (like rspec, rspec-rails etc). Use the command to see the candidates:
gem list rspec
This is easily solved:
bundle exec rspec
will force bundler to use the gem version you are requiring for your project, ignoring system-wide settings.