gpt4 book ai didi

ruby-on-rails - : `' : superclass mismatch for class Rash (TypeError)如何解决

转载 作者:行者123 更新时间:2023-12-04 05:37:43 28 4
gpt4 key购买 nike

突然我无法运行服务器。它抛出以下输出:

标题##/home/action/.gem/ruby/2.1.1/gems/rash-0.2.0/lib/rash.rb:5:in `': 类 Rash 的父类(super class)不匹配(TypeError)

    from /home/action/.gem/ruby/2.1.1/gems/rash-0.2.0/lib/rash.rb:4:in `<top (required)>'                                                                                           
from /home/action/.gem/ruby/2.1.1/gems/buff-0.0.6/lib/buff.rb:4:in `require'
from /home/action/.gem/ruby/2.1.1/gems/buff-0.0.6/lib/buff.rb:4:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /home/action/colocofg_pg/config/application.rb:7:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `require'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from /home/action/colocofg_pg/bin/rails:8:in `require'
from /home/action/colocofg_pg/bin/rails:8:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/action/.parts/packages/ruby2.1/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/action/.parts/packages/ruby2.1/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/action/colocofg_pg/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

我安装的最后一个 gems 是 Buff (github.com/zph/buff) 和 omniauth-buffer2 (github.com/bufferapp/omniauth-buffer2)。然后它开始发送消息。

是什么导致了这种不匹配以及如何解决它?

最佳答案

我在安装这两个 gem 后遇到了同样的错误。问题是,在他们的文档中,Buffer 说要使用“buff”gem,而你应该在 github.com/bufferapp/buffer-ruby 处使用“buffer”gem。 .他们从 github.com/zph/buff fork 出来几个月前。

将以下两个 gem 添加到您的 Gemfile 中:

gem 'buffer', :github => 'bufferapp/buffer-ruby'
gem 'omniauth-buffer2'

然后在你的 config/(name).rb

Rails.application.config.middleware.use OmniAuth::Builder do
provider :buffer, ENV['BUFFER_KEY'], ENV['BUFFER_SECRET']
end

一切顺利!

关于ruby-on-rails - : `<module:Hashie>' : superclass mismatch for class Rash (TypeError)如何解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26275300/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com