从Rails 3.2.13升级到3.2.15时,如何解决此Bundler错误?

时间:2013-10-18 15:01:10

标签: ruby-on-rails bundler

我正在尝试从Rails 3.2.13升级到3.2.15。

旧Gemfile

gem 'rails', '3.2.13'

新Gemfile

gem 'rails', '3.2.15'

当我运行bundle时,我明白了:

$ bundle
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.13)

  In Gemfile:
    rails (= 3.2.15) ruby depends on
      activesupport (= 3.2.15) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

advice I found online是运行bundle update rails来解决此问题,但这会更新到Rails 4.0。

如何解决此问题?

2 个答案:

答案 0 :(得分:1)

当您在Gemfile中指定了3.2.1.5时,运行bundle update不会将Rails更新为4.0。它不会更改您的Gemfile,只会更改Gemfile.lock

答案 1 :(得分:1)

你可以运行bundle update rails,它不会搞乱其他宝石。