How to solve: `<module: Hashie> ': superclass mismatch for class Rash (TypeError)

Suddenly I can't start the server. It produces the following output:

Header ## / home / action / .gem / ruby ​​/2.1.1/gems/rash-0.2.0/lib/rash.rb: 5: in `': superclass mismatch for class Rash (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>'    

      

The last gems I installed were Buff (github.com/zph/buff) and omniauth-buffer2 (github.com/bufferapp/omniauth-buffer2). And he starts to confuse messages.

What is causing the discrepancy and how can I resolve it?

+3


source to share


2 answers


I ran into this same error after installing these two gems. The problem is that in their documentation Buffer says to use the "buff" gem when you should use the "buffer" gem at github.com/bufferapp/buffer-ruby . A few weeks ago they forked from github.com/ zph / buff .

Add the following two stones to your Gemfile:

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

      



And then in your config / (name) .rb

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

      

And you're fine!

+2


source


Just uninstall ALL versions of Rash versions and ALL any other gems you installed since the last time you started the application (since before the error occurred), then reinstall the latest versions. You can see all your gems by running the "gem list"

There was likely a bug in one or more previous versions of the API calling the same class.



This happened to me with Rash and the Factual API and only reinstalling the latest versions fixed it!

0


source







All Articles