Bundler找不到gem“activesupport”的兼容版本
我迁移到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.
编辑
sinatra (1.3.6) rack (~> 1.4) rack-protection (~> 1.3) tilt (~> 1.3, >= 1.3.3)
对于任何意外地来到此链接的人(当时谷歌首先服务于此页面); 看看这篇文章Bundler找不到兼容的gem版本,更新Rails应用程序
我的步骤已经完成
gem update rails rm Gemfile.lock
更改我的Gemfile以引用我想要的rails版本
gem 'rails', '3.2.13'
终于跑了
bundle install
我没有像@PistachioPony建议的那样尝试捆绑更新,但这可能取代了删除锁定文件和重建。
如果您将rails更改为3.2.13,那么还要将gemfile.lock中的活动支持更改为3.2.13,然后:
跑:
$ bundle update
关闭你的服务器:
$ control c
在终端中确保您在项目文件夹中然后:重新启动服务器:
$ rails服务器
刷新浏览器
像这样: gem 'activeadmin', github: 'gregbell/active_admin'
da gemfile中的gem 'activeadmin', github: 'gregbell/active_admin'
带有Rails 4的ActiveAdmin要求您跟踪master。 从github页面:
我们目前正在开发1.0.0,就依赖性而言,它将我们从meta_search转移到Ransack并添加了Rails 4支持。 您可以通过跟踪master获得Rails 4和4.1支持:
gem 'activeadmin', github: 'gregbell/active_admin'
此外,请确保您不要使用主页上的文档,因为它们已过时用于rails 4.还有更新的带有master的rails 4的文档 。
我不确定这个答案多长时间是相关的,所以你应该检查github以确定在盲目跟踪master之前是否有变化。 此外,请注意跟踪主人通常意味着您将在发生变化时获得更改。
- Activesupport / Multi json:“无法识别您的适配器规范”
- 访问ActiveSupport :: LogSubscriber子类中的Rails请求
- 如何在Ruby中将JSON转换为XML?
- 如何从过时的TZInfo标识符中获取Rails TimeZone名称?
- 我如何需要ActiveSupport的rescue_from方法?
- 覆盖ActiveSupport :: Concern模块中的方法,这些方法由同一模块中的类方法定义
- 匿名模块可以用于什么目的?
- ActiveSupport中mattr_accessor和cattr_accessor之间的区别?
- 将Date对象转换为TimeWithZone