我遵循从分支到主(设计)的拉请求,但我仍然有错误,我不能再将api部署到服务器
我也尝试了这个问题中提供的解决方案,但没有成功:
最新omniauth-facebook gem break design
错误:
/.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)
在localhost
上的错误是相同的Ruby版本:2.5.1p57
rails (5.1.7)
设计(4.7.3)
omniauth (2.0.1)
omniauth-facebook (8.0.0)
omniauth-oauth2(1.7.1上)
我认为这个提交修复了你所看到的问题,不幸的是它不会通过bundle update
自动拉入你的项目,直到设计出他们的版本。
所以我认为你可以用gem 'devise', github: 'heartcombo/devise'
在Gemfile中修复这个问题(你可能需要先卸载原始版本)
你可以通过使用bundle show devise
来验证新的gem在哪里,转到lib/design/omniauth。Rb,并确保它以以下内容打开:
# PATH_TO_DEVISE_GEM/lib/devise/omniauth.rb
# frozen_string_literal: true
begin
gem "omniauth", ">= 1.0.0"
require "omniauth"
rescue LoadError
warn "Could not load 'omniauth'. Please ensure you have the omniauth gem >= 1.0.0 installed and listed in your Gemfile."
raise
end
当我昨天遇到同样的问题时,我的版本是这样的,这就是为什么它为我打破了它:
# PATH_TO_OLD_DEVISE_GEM/lib/devise/omniauth.rb
[...]
unless OmniAuth::VERSION =~ /^1./ if Gem::Version.new(OmniAuth::VERSION) < Gem::Version.new('1.0.0')
raise "You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed." raise "You are using an old OmniAuth version, please ensure you have 1.0.0 version or later installed."
end
[...]
将设计更新到最新版本(目前为4.8.0)应该可以解决此问题。我可以肯定,我的情况就是这样。
更多信息在这里:https://github.com/heartcombo/devise/commit/1d138dd40cdc291a427b89027d16a869818a5c19#commitcomment-50168476.