从 Rails 3.2.22 升级到 Rails 4.2.4 时出错
Error upgrading from Rails 3.2.22 to Rails 4.2.4
我正在尝试将我们的应用程序从 Rails 3.2.22 升级到 Rails 4.2.4 和 Ruby 2.2.3.
这是我目前所做的:
- 已修改 Gemfile 以指定
rails, "~> 4.2.4"
bundle
bundle update rails
完整成绩单如下。
我们的 Gemfile 中没有指定 ActiveRecord,所以我不明白它锁定了什么或在哪里修复它?
Craigs-MacBook-Pro~/Work/mbc(master|✔) % git checkout -b rails-424
Switched to a new branch 'rails-424'
Craigs-MacBook-Pro~/Work/mbc(rails-424|✔) % vim Gemfile
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) % bundle
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
You have requested:
rails ~> 4.2.4
The bundle currently has rails locked at 3.2.22.
Try running `bundle update rails`
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) % bundle update rails
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies............
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activerecord (< 4.3, >= 3.1) ruby
activerecord (< 5.0, >= 3.0) ruby
vestal_versions (>= 0) ruby depends on
activerecord (~> 3.0) ruby
activerecord (> 3.0.0) ruby
rails (~> 4.2.4) ruby depends on
activerecord (= 4.2.4) ruby
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) %
vestal_versions
gem 依赖于 ActiveRecord 3.0
.
您需要在 Gemfile 中取消指定 vestal_versions
gem 的版本,或者指定为 2.0.0
然后:
bundle update rails vestal_versions
我正在尝试将我们的应用程序从 Rails 3.2.22 升级到 Rails 4.2.4 和 Ruby 2.2.3.
这是我目前所做的:
- 已修改 Gemfile 以指定
rails, "~> 4.2.4"
bundle
bundle update rails
完整成绩单如下。
我们的 Gemfile 中没有指定 ActiveRecord,所以我不明白它锁定了什么或在哪里修复它?
Craigs-MacBook-Pro~/Work/mbc(master|✔) % git checkout -b rails-424
Switched to a new branch 'rails-424'
Craigs-MacBook-Pro~/Work/mbc(rails-424|✔) % vim Gemfile
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) % bundle
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
You have requested:
rails ~> 4.2.4
The bundle currently has rails locked at 3.2.22.
Try running `bundle update rails`
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) % bundle update rails
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies............
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activerecord (< 4.3, >= 3.1) ruby
activerecord (< 5.0, >= 3.0) ruby
vestal_versions (>= 0) ruby depends on
activerecord (~> 3.0) ruby
activerecord (> 3.0.0) ruby
rails (~> 4.2.4) ruby depends on
activerecord (= 4.2.4) ruby
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) %
vestal_versions
gem 依赖于 ActiveRecord 3.0
.
您需要在 Gemfile 中取消指定 vestal_versions
gem 的版本,或者指定为 2.0.0
然后:
bundle update rails vestal_versions