I am getting the following error when attempting to load the Rails environment after having updated to the latest gems
Failure/Error: require File.expand_path('../config/environment', __dir__)
RuntimeError:
You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed.
# /Users/paulfriedman/.rvm/gems/ruby-2.6.3/gems/devise-4.7.3/lib/devise/omniauth.rb:12:in `<top (required)>'
the error is coming from this omniauth version check
unless OmniAuth::VERSION =~ /^1\./
raise "You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed."
end
however the version of omniauth I am using (2.0.3) is the most recent as of 18 Feb 2021. omniauth released version 2.0.0 in January 2021 - so I expect this error to be happening for any omniauth gem 2.x.+ https://rubygems.org/gems/omniauth
Actually I don't know if devise has been tested against omniauth 2.0.0 so I suppose the first fix is to update the error message for OmniAuth::VERSION 2.0.0 or greater
then the next step is to test against omniauth 2.0.x (hopefully it just works)
if it works, then ensure the check above allows 2.0.x versions
if it doesn't, update the check to note that devise doesn't work with the most recent omniauth or fix devise-omniauth to work with version 2.0.x of omniauth
Please use devise master for the time being, it has fixes that allow it to work with OmniAuth 2.0.
It's pending a new release for different reasons including a few things I want to tackle before, but I'll get there eventually.
Thanks!
What a fast response - thanks!
Most helpful comment
Please use devise master for the time being, it has fixes that allow it to work with OmniAuth 2.0.
https://github.com/heartcombo/devise/blob/0cd72a56f984a7ff089246f87a8b259120545edd/CHANGELOG.md#unreleased
It's pending a new release for different reasons including a few things I want to tackle before, but I'll get there eventually.
Thanks!