Rails 5.1.0.beta1“bundle update rails”有gem冲突

时间:2017-03-07 11:20:53

标签: ruby-on-rails upgrade

我只是无法升级rails测试版。 我目前的rails版本是5.0.2,并希望升级到5.1.0.beta1版本。

ruby​​ -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

捆绑更新轨道

Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..`
Fetching dependency metadata from http://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    coffee-rails (~> 4.1.0) was resolved to 4.1.1, which depends on
      railties (< 5.1.x, >= 4.0.0)

    rails (~> 5.1.0.beta1) was resolved to 5.1.0.beta1, which depends on
      railties (= 5.1.0.beta1)

    sass-rails (~> 5.0) was resolved to 5.0.6, which depends on
      railties (< 6, >= 4.0.0)

捆绑更新

Fetching https://github.com/megetron/active_merchant_tranzila.git
Fetching https://github.com/megetron/active_shipping.git
Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..
Fetching dependency metadata from http://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    coffee-rails (~> 4.1.0) was resolved to 4.1.0, which depends on
      railties (< 5.0, >= 4.0.0)

    devise was resolved to 4.2.0, which depends on
      railties (< 5.1, >= 4.1.0)

    rails (~> 5.1.0.beta1) was resolved to 5.1.0.beta1, which depends on
      railties (= 5.1.0.beta1)

    sass-rails (~> 5.0) was resolved to 5.0.6, which depends on
      railties (< 6, >= 4.0.0)

    web-console (~> 2.0) was resolved to 2.3.0, which depends on
      railties (>= 4.0)

3 个答案:

答案 0 :(得分:2)

如果我正确读取此内容,则需要删除coffee-railsGemfile的版本限制,因为它与Rails 5.1.x不兼容。

答案 1 :(得分:0)

在您的终端中执行此操作

gem update rails
bundle update

答案 2 :(得分:0)

尝试使用存储库中的devise gem,因为它们尚未发布rails 5.1版本(很可能很快就会发生)。

在您的Gemfile中,使用以下内容替换设计行:

gem&#39; devise&#39;,github:&#39; plataformatec / devise&#39;