I followed the pull request from the branch to the master (devise) but I'm still having the error and I can't deploy the api to the server anymore
I also tried the solutions provided in this question but was not successful:
Latest omniauth-facebook gem breaks devise
The error:
/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/devise-4.7.3/lib/devise/omniauth.rb:12:in `<top (required)>': You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed. (RuntimeError)
the error is the same on localhost
Ruby version: 2.5.1p57
rails (5.1.7)
devise (4.7.3)
omniauth (2.0.1)
omniauth-facebook (8.0.0)
omniauth-oauth2 (1.7.1)
I think this commit fixes the issue you are seeing, unfortunately it will not automatically be pulled into your project through
bundle updateuntil devise bumps their version.So I think you can fix this in the Gemfile with
gem 'devise', github: 'heartcombo/devise'(you may need to uninstall the original version first)And you can verify by using
bundle show deviseto reveal where the new gem is, go to lib/devise/omniauth.rb, and make sure it opens with the following:What my version had when I ran into this exact same problem yesterday was the following, and this is why it was breaking it for me: