Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

uninitialized constant Psych::Streaming::ClassMethods (NameError) #170

Open
apolishch opened this Issue · 2 comments

3 participants

@apolishch

I am getting the following when attempting to run rspec:

/Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych/stream.rb:35:in <class:Stream>': uninitialized constant Psych::Streaming::ClassMethods (NameError)
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych/stream.rb:23:in
module:Psych'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych/stream.rb:1:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych.rb:13:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych.rb:13:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/activesupport-3.2.12/lib/active_support/ordered_hash.rb:2:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/activesupport-3.2.12/lib/active_support/ordered_hash.rb:2:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/activesupport-3.2.12/lib/active_support/ordered_options.rb:1:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/activesupport-3.2.12/lib/active_support/ordered_options.rb:1:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/configuration.rb:2:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/configuration.rb:2:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/railtie.rb:2:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/railtie.rb:2:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/engine.rb:1:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/engine.rb:1:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/plugin.rb:1:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/plugin.rb:1:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/application.rb:3:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/application.rb:3:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails.rb:10:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails.rb:10:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/all.rb:1:in
require'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/railties-3.2.12/lib/rails/all.rb:1:in <top (required)>'
from /Users/gb/workspace/togo/config/application.rb:3:in
require'
from /Users/gb/workspace/togo/config/application.rb:3:in <top (required)>'
from /Users/gb/workspace/togo/config/environment.rb:2:in
require'
from /Users/gb/workspace/togo/config/environment.rb:2:in <top (required)>'
from /Users/gb/workspace/togo/spec/spec_helper.rb:2:in
require'
from /Users/gb/workspace/togo/spec/spec_helper.rb:2:in <top (required)>'
from /Users/gb/workspace/togo/spec/features/request_spec_helper.rb:1:in
require_relative'
from /Users/gb/workspace/togo/spec/features/request_spec_helper.rb:1:in <top (required)>'
from /Users/gb/workspace/togo/spec/features/activities_spec.rb:1:in
require_relative'
from /Users/gb/workspace/togo/spec/features/activities_spec.rb:1:in <top (required)>'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in
load'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in block in load_spec_files'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in
each'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in load_spec_files'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in
run'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in run'
from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in
block in autorun'

Any thoughts on what could be causing this?

@tenderlove
Owner

I'm not sure. Can you give me some code to reproduce this?

@dmgust2

Tenderlove I could use your extensive wisdom on this one!
I'm hitting this same exception as above when running anything after adding gem 'psych' to my gemfile (and running bundle install). We're using Rails 3.2.8. I'm guessing this is some kind of incompatibility but not sure how to resolve. I tried various versions of Psych (2.0.4-2.0.8). This is the only thing I found online with my exact error...

The whole reason why I wanted to explicitly include the psych gem is because we are internally using very old versions and wanted to ensure good JSON parse support:
DEBUG: Psych version: 1.2.2
DEBUG: Psych libyaml version: 0.1.4

Here's the stacktrace:

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/psych-2.0.8/lib/psych/stream.rb:35:in `<class:Stream>': uninitialized constant Psych::Streaming::ClassMethods (NameError)
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/psych-2.0.8/lib/psych/stream.rb:23:in `<module:Psych>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/psych-2.0.8/lib/psych/stream.rb:1:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/psych-2.0.8/lib/psych.rb:13:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/psych-2.0.8/lib/psych.rb:13:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/ordered_hash.rb:2:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/ordered_hash.rb:2:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/ordered_options.rb:1:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/ordered_options.rb:1:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/configuration.rb:2:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/configuration.rb:2:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/railtie.rb:2:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/railtie.rb:2:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:1:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:1:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/plugin.rb:1:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/plugin.rb:1:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:3:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:3:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails.rb:10:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails.rb:10:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/all.rb:1:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/all.rb:1:in `<top (required)>'
    from C:/Dave/P4/tools/cth/main/request_handler/config/application.rb:3:in `require'
    from C:/Dave/P4/tools/cth/main/request_handler/config/application.rb:3:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
    from C:/Dave/P4/tools/cth/main/request_handler/script/rails:6:in `require'
    from C:/Dave/P4/tools/cth/main/request_handler/script/rails:6:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.