gpt4 book ai didi

ruby-on-rails - Bundler 不允许我安装 gems

转载 作者:数据小太阳 更新时间:2023-10-29 07:53:25 25 4
gpt4 key购买 nike

每当我尝试运行 rspec 测试时,我都试图消除这些烦人的 DEPRECATION WARNINGS(我正在通过 Rails 教程跋涉)。

我尝试遵循这里的建议:rspec triggers "DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically."简单地更新我的 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 来更新我所有的 gem。然而,这产生了不更新那些 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)

最佳答案

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

sudo gem uninstall rspec-core -v 2.2.1
bundle update rspec-core

这对于其他依赖的 gem 可能是必需的,比如 (rspec-rails, rspec)

通过 gem list rspec 进行检查

关于ruby-on-rails - Bundler 不允许我安装 gems,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14740590/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com