Ruby on rails Bundler赢得';不要让我安装gems

Ruby on rails Bundler赢得';不要让我安装gems,ruby-on-rails,ruby,rspec,gem,bundler,Ruby On Rails,Ruby,Rspec,Gem,Bundler,每当我尝试运行rspec测试时,我都试图消除这些恼人的不推荐警告(我正在艰难地阅读Rails教程) 我试着按照这里的建议:简单地更新我的rspec版本 然而,每当我尝试这样做时,我都会得到这样的信息: The bundle currently has rspec-core locked at 2.1.0. Try running `bundle update rspec-core` 或者这个: Bundler could not find compatible versions for gem

每当我尝试运行rspec测试时,我都试图消除这些恼人的不推荐警告(我正在艰难地阅读Rails教程)

我试着按照这里的建议:简单地更新我的rspec版本

然而,每当我尝试这样做时,我都会得到这样的信息:

The bundle currently has rspec-core locked at 2.1.0.
Try running `bundle update rspec-core`
或者这个:

Bundler could not find compatible versions for gem "rspec-core":
  In Gemfile:
    rspec-rails (= 2.1.0) x86-mingw32 depends on
      rspec-core (~> 2.1.0) x86-mingw32

    rspec-core (2.10.1)
最后,我继续点击
bundle install
更新我所有的gems。然而,这产生了不更新那些rspec的奇妙结果。发生什么事?(我一直在更新对当前git分支的提交。)

多谢各位

编辑:以下是我的gemfile和gemfile.lock的外观:

source 'https://rubygems.org'

gem 'rails', '3.2.1'

group :development, :test do
    gem 'sqlite3', '1.3.5'
    gem 'rspec-rails', '2.1.0' #NOTICE: possible error with rails version
end

group :assets do
  gem 'sass-rails',   '~> 3.2.5'
  gem 'coffee-rails', '~> 3.2.2'    
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.2'

group :test do
  gem 'capybara', '1.1.2'
end

group :production do
  gem 'pg', '0.12.2'
end
和我的gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (3.2.1)
      actionpack (= 3.2.1)
      mail (~> 2.4.0)
    actionpack (3.2.1)
      activemodel (= 3.2.1)
      activesupport (= 3.2.1)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.1)
      rack (~> 1.4.0)
      rack-cache (~> 1.1)
      rack-test (~> 0.6.1)
      sprockets (~> 2.1.2)
    activemodel (3.2.1)
      activesupport (= 3.2.1)
      builder (~> 3.0.0)
    activerecord (3.2.1)
      activemodel (= 3.2.1)
      activesupport (= 3.2.1)
      arel (~> 3.0.0)
      tzinfo (~> 0.3.29)
    activeresource (3.2.1)
      activemodel (= 3.2.1)
      activesupport (= 3.2.1)
    activesupport (3.2.1)
      i18n (~> 0.6)
      multi_json (~> 1.0)
    arel (3.0.2)
    builder (3.0.4)
    capybara (1.1.2)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (~> 2.0)
      xpath (~> 0.1.4)
    childprocess (0.3.7)
      ffi (~> 1.0, >= 1.0.6)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.4.0)
    diff-lcs (1.1.3)
    erubis (2.7.0)
    execjs (1.4.0)
      multi_json (~> 1.0)
    ffi (1.3.1-x86-mingw32)
    hike (1.2.1)
    i18n (0.6.1)
    journey (1.0.4)
    jquery-rails (2.0.2)
      railties (>= 3.2.0, < 5.0)
      thor (~> 0.14)
    json (1.7.6)
    mail (2.4.4)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.20.1)
    multi_json (1.5.0)
    nokogiri (1.5.6-x86-mingw32)
    pg (0.12.2-x86-mingw32)
    polyglot (0.3.3)
    rack (1.4.4)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.1)
      actionmailer (= 3.2.1)
      actionpack (= 3.2.1)
      activerecord (= 3.2.1)
      activeresource (= 3.2.1)
      activesupport (= 3.2.1)
      bundler (~> 1.0)
      railties (= 3.2.1)
    railties (3.2.1)
      actionpack (= 3.2.1)
      activesupport (= 3.2.1)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (~> 0.14.6)
    rake (10.0.3)
    rdoc (3.12.1)
      json (~> 1.4)
    rspec (2.1.0)
      rspec-core (~> 2.1.0)
      rspec-expectations (~> 2.1.0)
      rspec-mocks (~> 2.1.0)
    rspec-core (2.1.0)
    rspec-expectations (2.1.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.1.0)
    rspec-rails (2.1.0)
      rspec (~> 2.1.0)
    rubyzip (0.9.9)
    sass (3.2.5)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    selenium-webdriver (2.29.0)
      childprocess (>= 0.2.5)
      multi_json (~> 1.0)
      rubyzip
      websocket (~> 1.0.4)
    sprockets (2.1.3)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sqlite3 (1.3.5-x86-mingw32)
    thor (0.14.6)
    tilt (1.3.3)
    treetop (1.4.12)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.35)
    uglifier (1.2.3)
      execjs (>= 0.3.0)
      multi_json (>= 1.0.2)
    websocket (1.0.7)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  capybara (= 1.1.2)
  coffee-rails (~> 3.2.2)
  jquery-rails (= 2.0.2)
  pg (= 0.12.2)
  rails (= 3.2.1)
  rspec-rails (= 2.1.0)
  sass-rails (~> 3.2.5)
  sqlite3 (= 1.3.5)
  uglifier (= 1.2.3)
GEM
远程:https://rubygems.org/
规格:
actionmailer(3.2.1)
actionpack(=3.2.1)
邮件(~>2.4.0)
actionpack(3.2.1)
活动模型(=3.2.1)
主动支持(=3.2.1)
生成器(~>3.0.0)
erubis(~>2.7.0)
旅程(~>1.0.1)
机架(~>1.4.0)
机架缓存(~>1.1)
机架测试(~>0.6.1)
链轮(~>2.1.2)
activemodel(3.2.1)
主动支持(=3.2.1)
生成器(~>3.0.0)
activerecord(3.2.1)
活动模型(=3.2.1)
主动支持(=3.2.1)
arel(~>3.0.0)
tzinfo(~>0.3.29)
activeresource(3.2.1)
活动模型(=3.2.1)
主动支持(=3.2.1)
activesupport(3.2.1)
i18n(~>0.6)
多重json(~>1.0)
阿雷尔(3.0.2)
建筑商(3.0.4)
水豚(1.1.2)
mime类型(>=1.16)
nokogiri(>=1.3.3)
机架(>=1.0.0)
机架测试(>=0.5.4)
selenium webdriver(~>2.0)
xpath(~>0.1.4)
子进程(0.3.7)
外国金融机构(~>1.0,>=1.0.6)
咖啡架(3.2.2)
咖啡脚本(>=2.2.0)
钢轨(~>3.2.0)
咖啡脚本(2.2.0)
咖啡脚本源
execjs
coffee脚本源代码(1.4.0)
差异lcs(1.1.3)
erubis(2.7.0)
execjs(1.4.0)
多重json(~>1.0)
外国金融机构(1.3.1-x86-W32)
徒步旅行(1.2.1)
i18n(0.6.1)
旅程(1.0.4)
jquery rails(2.0.2)
钢轨(>=3.2.0,<5.0)
雷神(~>0.14)
json(1.7.6)
邮件(2.4.4)
i18n(>=0.4.0)
mime类型(~>1.16)
树梢(~>1.4.8)
mime类型(1.20.1)
多线程json(1.5.0)
nokogiri(1.5.6-x86-W32)
pg(0.12.2-x86-mingw32)
polyglot(0.3.3)
机架(1.4.4)
机架缓存(1.2)
机架(>=0.4)
机架ssl(1.3.3)
支架
机架测试(0.6.2)
机架(>=1.0)
轨道(3.2.1)
actionmailer(=3.2.1)
actionpack(=3.2.1)
活动记录(=3.2.1)
活动资源(=3.2.1)
主动支持(=3.2.1)
捆扎机(~>1.0)
栏杆(=3.2.1)
栏杆(3.2.1)
actionpack(=3.2.1)
主动支持(=3.2.1)
机架ssl(~>1.3.2)
耙(大于等于0.8.7)
rdoc(~>3.4)
雷神(~>0.14.6)
耙(10.0.3)
rdoc(3.12.1)
json(~>1.4)
rspec(2.1.0)
rspec核心(~>2.1.0)
rspec期望值(~>2.1.0)
rspec模拟(~>2.1.0)
rspec核心(2.1.0)
rspec期望值(2.1.0)
差异lcs(~>1.1.2)
rspec模拟(2.1.0)
rspec导轨(2.1.0)
rspec(~>2.1.0)
rubyzip(0.9.9)
sass(3.2.5)
sass轨道(3.2.6)
钢轨(~>3.2.0)
sass(>=3.1.10)
倾斜(~>1.3)
selenium webdriver(2.29.0)
子进程(>=0.2.5)
多重json(~>1.0)
鲁比齐普
websocket(~>1.0.4)
链轮(2.1.3)
徒步旅行(~>1.2)
机架(~>1.0)
倾斜(~>1.1,!=1.3.0)
sqlite3(1.3.5-x86-mingw32)
雷神(0.14.6)
倾斜(1.3.3)
树梢(1.4.12)
多语言文字
多克隆(>=0.3.1)
tzinfo(0.3.35)
丑八怪(1.2.3)
execjs(>=0.3.0)
multi_json(>=1.0.2)
websocket(1.0.7)
xpath(0.1.4)
nokogiri(~>1.3)
平台
x86-w32
依赖关系
水豚(=1.1.2)
咖啡轨(~>3.2.2)
jquery rails(=2.0.2)
pg(=0.12.2)
钢轨(=3.2.1)
rspec钢轨(=2.1.0)
sass轨道(~>3.2.5)
sqlite3(=1.3.5)
丑八怪(=1.2.3)

我认为您的问题在于,您只需执行以下操作

sudo gem uninstall rspec-core -v 2.2.1
bundle update rspec-core
这可能需要其他依赖gem,如(rspec-rails,rspec)


通过执行
gem list rspec

检查这一点。是否尝试删除
gem文件。锁定
并重新运行
bundle
命令。之后的输出是什么?我的链轮3.7.0出现了一些问题。实际上我通过
gem-list-sprockets卸载了sprocket 3.7.0;齿轮;选择要卸载的一个
。但我得到了错误
捆绑包当前已将链轮锁定在3.7.0。
但在我
捆绑包更新链轮之后,正如@David建议的那样。每件事都很有魅力。