Trying to upgrade Rails form 5.2.3 to 6.0.0 via bundle update rails, getting the following error:
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 6.0.0)
devise-security was resolved to 0.14.2, which depends on
rails (>= 4.2.0, < 7.0)
devise_token_auth was resolved to 1.1.0, which depends on
rails (>= 4.2.0, < 6)
You are using the devise_token_auth
gem in your application. The latest version of that is gem is 1.1.0
and that version doesn't support Ruby on Rails 6.0 yet. It still depends on
Rails >= 4.2.0
and < 6
(see the column in the middle of its Rubygems
page.
The fact that Rails released a new mayor version usually doesn't mean that all gem support that version on day one. Btw, this is the reason I always suggest keeping the number of used gems as low as possible and not to add a new gem dependency for every simple problem. And often we see that gems never get updated or very late.
In this case it looks like you are lucky because on master
on GitHub this issue is already solved. That means the maintainer is aware of this issue and is working on it. You could choose to pull the gem directly from GitHub by changing the entry in your Gemfile
to
gem 'devise_token_auth', github: 'lynndylanhurley/devise_token_auth'
But keep in mind that that means you are basically using the latest alpha version all the time, and I would not recommend that on production. It might be a good idea to move forward updating your application, though.