我刚刚从4.2更新到Rails 5.2(从4.2开始),并且每当我尝试运行rails s
时都会收到此错误:
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'active_shipping'. (Bundler::GemRequireError)
Gem Load Error is: undefined method `superclass_delegating_accessor' for ActiveMerchant::Shipping::Carrier:Class
Backtrace for gem load error is:
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/active_utils-2.2.3/lib/active_utils/common/posts_data.rb:5:in `included'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/active_shipping-0.12.6/lib/active_shipping/shipping/carrier.rb:5:in `include'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/active_shipping-0.12.6/lib/active_shipping/shipping/carrier.rb:5:in `<class:Carrier>'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/active_shipping-0.12.6/lib/active_shipping/shipping/carrier.rb:3:in `<module:Shipping>'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/active_shipping-0.12.6/lib/active_shipping/shipping/carrier.rb:2:in `<module:ActiveMerchant>'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/active_shipping-0.12.6/lib/active_shipping/shipping/carrier.rb:1:in `<top (required)>'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/active_shipping-0.12.6/lib/active_shipping.rb:51:in `<top (required)>'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:81:in `require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `each'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `block in require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `each'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler.rb:114:in `require'
/Users/lizbayardelle/Dropbox/Code/MAB/config/application.rb:16:in `<top (required)>'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in `require'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in `block in perform'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `tap'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `perform'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke'
/Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:9:in `require'
bin/rails:9:in `<main>'
Bundler Error Backtrace:
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:80:in `block (2 levels) in require'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `each'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `block in require'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `each'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `require'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/bundler-1.16.2/lib/bundler.rb:114:in `require'
from /Users/lizbayardelle/Dropbox/Code/MAB/config/application.rb:16:in `<top (required)>'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in `require'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in `block in perform'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `tap'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `perform'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke'
from /Users/lizbayardelle/.rvm/gems/ruby-2.3.3/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:9:in `require'
from bin/rails:9:in `<main>'
我尝试过bundle update active_shipping
和gem install active_shipping
,但是看来我有该gem的最新版本。
有人可以帮助我解析此错误吗?类似的捆绑器错误似乎是更新Rails版本的一部分,但我似乎无法弄清楚这一点。