Ruby-on-rails Bundler 找不到 gem "activesupport" 的兼容版本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15597361/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bundler could not find compatible versions for gem "activesupport"
提问by Sam
I migrated to 3.2.13 version of rails and I am getting this error, how do I get rid of this?
我迁移到 3.2.13 版本的 rails 并收到此错误,我该如何摆脱这个错误?
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
In snapshot (Gemfile.lock):
activesupport (3.2.12)
In Gemfile:
rails (= 3.2.13) ruby depends on
activesupport (= 3.2.13) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
EDIT
编辑
sinatra (1.3.6)
rack (~> 1.4)
rack-protection (~> 1.3)
tilt (~> 1.3, >= 1.3.3)
回答by
For anyone who accidently comes to this link (at the time google served this page first); check out this post Bundler could not find compatible versions for gem, updating Rails app
对于不小心访问此链接的任何人(当时谷歌首先提供此页面);查看这篇文章Bundler 找不到 gem 的兼容版本,更新 Rails 应用程序
My steps were run
我的步骤被运行
gem update rails
rm Gemfile.lock
change my Gemfile to reference the version of rails i wanted
更改我的 Gemfile 以引用我想要的 rails 版本
gem 'rails', '3.2.13'
finally run
终于跑了
bundle install
I didn't try bundle update as @PistachioPony suggested but that might take the place of removing the lock file and rebuilding.
我没有像@PistachioPony 建议的那样尝试捆绑更新,但这可能会代替删除锁定文件并重建。
回答by Rick Smith
ActiveAdmin with Rails 4 requires you to track master. From the github page:
带有 Rails 4 的 ActiveAdmin 需要您跟踪 master。从github页面:
We're currently working on 1.0.0, which as far as dependencies, moves us from meta_search to Ransack and adds Rails 4 support. You can get Rails 4 and 4.1 support by tracking master:
我们目前正在开发 1.0.0,就依赖而言,它将我们从 meta_search 移动到 Ransack 并添加了 Rails 4 支持。您可以通过跟踪 master 获得 Rails 4 和 4.1 支持:
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'activeadmin', github: 'gregbell/active_admin'
Also, make sure you DON'Tuse the docs on the main pagebecause they are outdated for rails 4. There are updated docs for rails 4with master.
另外,请确保您不要使用主页上的文档,因为它们对于 rails 4 来说已经过时了。有带有 master 的rails 4 的更新文档。
I'm not sure how much longer this answer will be relevant, so you should check githubto see if things have changed before blindly tracking master. Also, note that tracking master usually means you will get development changes as they come.
我不确定这个答案会持续多久,所以你应该在盲目跟踪 master 之前检查 github以查看情况是否发生了变化。另外,请注意,跟踪母版通常意味着您将在开发更改来临时获得它们。
回答by mongoUser
If you changed your rails to 3.2.13 then also change your active support in the gemfile.lock to 3.2.13 then:
如果您将 rails 更改为 3.2.13,那么还将 gemfile.lock 中的活动支持更改为 3.2.13,然后:
Run:
跑:
$ bundle update
$ 捆绑更新
shut down your server:
关闭你的服务器:
$ control c
$控制c
Make sure in your terminal that you are in your project folderthen: restart your server:
确保在您的终端中您位于您的项目文件夹中,然后:重新启动您的服务器:
$ rails server
$ 导轨服务器
refresh your browser
刷新浏览器
回答by Connor Leech
go like this: gem 'activeadmin', github: 'gregbell/active_admin'in da gemfile
像这样:gem 'activeadmin', github: 'gregbell/active_admin'在 da gemfile 中

