我正在尝试将一个旧项目升级到ruby和rails的新版本。
ruby 2.5.1 -〉ruby 3.1.2 Rails网址:5.2.8.1-〉Rails 6.0.3
这是我得到的错误:
$ bundle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies.....
Bundler could not find compatible versions for gem "actionpack":
In snapshot (Gemfile.lock):
actionpack (= 5.2.8.1)
In Gemfile:
rails (~> 6.0.3) was resolved to 6.0.3, which depends on
actionpack (= 6.0.3)
devise_token_auth (= 1.0.0) was resolved to 1.0.0, which depends on
devise (> 3.5.2, < 4.6) was resolved to 4.5.0, which depends on
railties (>= 4.1.0, < 6.0) was resolved to 5.2.8.1, which depends on
actionpack (= 5.2.8.1)
Deleting your Gemfile.lock file and running `bundle install` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
$ rails s
Could not find gem 'rails (~> 6.0.3)' in locally installed gems.
The source contains the following gems matching 'rails':
* rails-5.2.8.1
Run `bundle install` to install missing gems.
我希望将我的旧Rails项目更新为更新版本的ruby和Rails,包括工作依赖关系。
1条答案
按热度按时间nbnkbykc1#
Devise gem直到4.7版本才支持Ruby on Rails 6.0。这意味着当您想将Rails更新到6.0时,您需要同时更新Devise。
我会尝试跑步:
顺便说一句,Rubygems是研究版本依赖性的一个很好的资源。例如,在这里,你可以看到Devise 4.6.2只支持低于6.0的railties,但是Devise 4.7.0已经删除了这个限制。