我改变了轨线在我的应用程序的Gemfile中来自:升级我的应用程序到Rails 5.不知道是怎么打的包错误的安装
gem 'rails', '4.2.3'
要:
gem 'rails', '5.0.0'
每轨有关升级过程的文档。然后我跑了bundle update rails
。然后我碰到一个包版:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
dotenv-rails (= 2.0.2) was resolved to 2.0.2, which depends on
railties (~> 4.0)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
据我所知,railties是rails的一部分吗?这似乎很奇怪。幽默的错误,我说:
gem 'railties', '5.0.0'
然后bundle update railties
产量:
Bundler could not find compatible versions for gem "activerecord":
In snapshot (Gemfile.lock):
activerecord (= 4.2.3)
In Gemfile:
annotate was resolved to 2.7.2, which depends on
activerecord (< 6.0, >= 3.2)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
activerecord (= 5.0.0)
我按照rabbithole并添加:
gem 'activerecord', '5.0.0'
bundle update activerecord
产量...
You have requested:
railties = 5.0.0
The bundle currently has railties locked at 4.2.3.
Try running `bundle update railties`
T他甚至更新活跃记录的原因是我可以更新railties ......它以圈子形式运行我。
如果我运行bundle update
我完全的Gemfile现在(的ActiveRecord和railties补充):
Bundler could not find compatible versions for gem "railties":
In Gemfile:
devise (~> 3.5.6) was resolved to 3.5.6, which depends on
railties (< 5, >= 3.2.6)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
我承认我不是在这个过程中,总亲。有什么我失踪?有没有人在升级过程中遇到类似的情况?
你试过删除'Gemfile.lock'并重新运行'bundle'吗?有时候,诀窍 –
@NickM我只是尝试。不幸的是,我再次面对最后的错误(一个谈论设计)。 – PinkElephantsOnParade
不要删除'Gemfile.lock'!您将失去语义版本控制的好处,跳到您可能未做好准备的版本。 – Leito