我正在尝试从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。
如何解决此问题?
答案 0 :(得分:1)
当您在Gemfile中指定了3.2.1.5时,运行bundle update
不会将Rails更新为4.0。它不会更改您的Gemfile
,只会更改Gemfile.lock
。
答案 1 :(得分:1)
你可以运行bundle update rails,它不会搞乱其他宝石。