Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 'sqlite3-ruby', :require => 'sqlite3'

group :development do
  gem 'rspec-rails'
end

group :test do
  gem 'rspec'
  gem 'webrat', '0.7.1'
end

However, when I run 'rspec spec/', I get the following message:

/home/jeff/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:27:in `block in setup': 
You have already activated rspec-core 2.2.1, but your Gemfile requires rspec-core 2.1.0. 
Consider using bundle exec. (Gem::LoadError)
like image 681
user338413 Avatar asked Dec 02 '10 16:12

user338413


1 Answers

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.

like image 91
Sam Ritchie Avatar answered Nov 02 '22 23:11

Sam Ritchie