我改變了軌線在我的應用程序的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