New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method `tagged_classes' for Psych:Module on Ruby 2.2.0-preview1 #67

Closed
sferik opened this Issue Sep 19, 2014 · 12 comments

Comments

Projects
None yet
7 participants
@sferik

sferik commented Sep 19, 2014

irb(main):001:0> RUBY_VERSION
=> "2.2.0"
irb(main):002:0> require 'safe_yaml'
NoMethodError: undefined method `tagged_classes' for Psych:Module
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>'
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in `<top (required)>'
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `<top (required)>'
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from (irb):2
    from /Users/sferik/.rbenv/versions/2.2.0-preview1/bin/irb:11:in `<main>'

I do not get this error on Ruby 2.1.2, 2.0.0, or 1.9.3.

@iorionda

This comment has been minimized.

Show comment
Hide comment
@iorionda

iorionda Sep 22, 2014

I met a same probrem on Ruby 2.2.0-dev and 2.2.0-preview1
but I do not get this error on Ruby 2.1.3.

iorionda commented Sep 22, 2014

I met a same probrem on Ruby 2.2.0-dev and 2.2.0-preview1
but I do not get this error on Ruby 2.1.3.

@iorionda

This comment has been minimized.

Show comment
Hide comment
@iorionda

iorionda Sep 22, 2014

I confirmed that I worked in master branch.
25e2e15

I wait for release.

iorionda commented Sep 22, 2014

I confirmed that I worked in master branch.
25e2e15

I wait for release.

@sferik

This comment has been minimized.

Show comment
Hide comment
@sferik

sferik Sep 22, 2014

@dtao Would it be possible for you to release safe_yaml version 1.0.4, so I can start testing my gems against Ruby 2.2.0-preview1?

sferik commented Sep 22, 2014

@dtao Would it be possible for you to release safe_yaml version 1.0.4, so I can start testing my gems against Ruby 2.2.0-preview1?

@dtao

This comment has been minimized.

Show comment
Hide comment
@dtao

dtao Sep 26, 2014

Owner

Well, great! Yes, I will look into fixing this for Ruby 2.2.0.

Owner

dtao commented Sep 26, 2014

Well, great! Yes, I will look into fixing this for Ruby 2.2.0.

@dtao

This comment has been minimized.

Show comment
Hide comment
@dtao

dtao Sep 26, 2014

Owner

@sferik, what do you get for YAML::VERSION?

It's very strange—it seems this error must occur because it thinks the YAML engine is Syck, which it clearly isn't since the exception you're seeing shows that YAML and Psych are the same.

Actually, on that note, what do you get when you just type YAML into irb?

I've just installed Ruby 2.2.0-preview1 and am having trouble reproducing this.

Owner

dtao commented Sep 26, 2014

@sferik, what do you get for YAML::VERSION?

It's very strange—it seems this error must occur because it thinks the YAML engine is Syck, which it clearly isn't since the exception you're seeing shows that YAML and Psych are the same.

Actually, on that note, what do you get when you just type YAML into irb?

I've just installed Ruby 2.2.0-preview1 and am having trouble reproducing this.

@deepj

This comment has been minimized.

Show comment
Hide comment
@deepj

deepj Sep 26, 2014

@dtao
It is easy to reproduce with fresh build Ruby 2.2.0preview1 on Mac OS X 10.9.5

$ ruby -v
ruby 2.2.0preview1 (2014-09-17 trunk 47616) [x86_64-darwin13]
$ gem install safe_yaml
Fetching: safe_yaml-1.0.3.gem (100%)
Successfully installed safe_yaml-1.0.3
1 gem installed
$ irb
irb(main):001:0> require 'safe_yaml'
NoMethodError: undefined method `tagged_classes' for Psych:Module
    from /Users/deepj/.gem/ruby/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>'
    from /Users/deepj/.gem/ruby/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in `<top (required)>'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/deepj/.gem/ruby/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `<top (required)>'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from (irb):1
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/bin/irb:11:in `<main>'
irb(main):002:0> YAML::VERSION
=> "2.0.6"

deepj commented Sep 26, 2014

@dtao
It is easy to reproduce with fresh build Ruby 2.2.0preview1 on Mac OS X 10.9.5

$ ruby -v
ruby 2.2.0preview1 (2014-09-17 trunk 47616) [x86_64-darwin13]
$ gem install safe_yaml
Fetching: safe_yaml-1.0.3.gem (100%)
Successfully installed safe_yaml-1.0.3
1 gem installed
$ irb
irb(main):001:0> require 'safe_yaml'
NoMethodError: undefined method `tagged_classes' for Psych:Module
    from /Users/deepj/.gem/ruby/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>'
    from /Users/deepj/.gem/ruby/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in `<top (required)>'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/deepj/.gem/ruby/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `<top (required)>'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from (irb):1
    from /Users/deepj/.rubies/ruby-2.2.0-preview1/bin/irb:11:in `<main>'
irb(main):002:0> YAML::VERSION
=> "2.0.6"
@dtao

This comment has been minimized.

Show comment
Hide comment
@dtao

dtao Sep 26, 2014

Owner

Oh oh oh, I understand now. I misunderstood @iori-o's comment that "I worked in master branch": I thought he was saying this issue is reproducible on master; but in fact it looks like it is fixed on master (as of #25e2e15).

I'll issue a new release later today.

Owner

dtao commented Sep 26, 2014

Oh oh oh, I understand now. I misunderstood @iori-o's comment that "I worked in master branch": I thought he was saying this issue is reproducible on master; but in fact it looks like it is fixed on master (as of #25e2e15).

I'll issue a new release later today.

@dtao

This comment has been minimized.

Show comment
Hide comment
@dtao

dtao Sep 28, 2014

Owner

OK, 1.0.4 released today, which should resolve this issue.

Owner

dtao commented Sep 28, 2014

OK, 1.0.4 released today, which should resolve this issue.

@dtao dtao closed this Sep 28, 2014

@arunagw arunagw referenced this issue Dec 29, 2014

Merged

Use ruby 2.2.0 #542

briankung added a commit to briankung/react that referenced this issue Feb 12, 2015

Bumps safe_yaml to 1.0.4 (was 1.0.3) to fix bug
safe_yaml 1.0.3 has some issues with Ruby 2.2.0:
dtao/safe_yaml#67
@pdostal

This comment has been minimized.

Show comment
Hide comment
@pdostal

pdostal Mar 6, 2015

I had this error after I anstalled jekyll and after I installed safe_yaml everything's OK, so thanks 👍

pdostal commented Mar 6, 2015

I had this error after I anstalled jekyll and after I installed safe_yaml everything's OK, so thanks 👍

alext added a commit to alphagov/collections-publisher that referenced this issue Apr 17, 2015

Upgrade ruby to 2.2.2
Needed to bump safe_yaml to get fix for
dtao/safe_yaml#67

alext added a commit to alphagov/collections-publisher that referenced this issue Apr 17, 2015

Upgrade ruby to 2.2.2
Needed to bump safe_yaml to get fix for
dtao/safe_yaml#67

claudiob added a commit to claudiob/rails.github.com that referenced this issue May 3, 2015

Update Jekyll to run with Ruby 2.2
Running ruby 2.2.2p95 on my machine, I was not able to start the
application locally: `jekyll --server` would return this error:

```
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:385:in `block in require_program': program version required (Commander::Runner::CommandError)
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `each'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `require_program'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:52:in `run!'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>': undefined method `tagged_classes' for Psych:Module (NoMethodError)
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in `<top (required)>'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `require'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `<top (required)>'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `require'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `<top (required)>'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/bin/jekyll:7:in `require'
	from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/bin/jekyll:7:in `<top (required)>'
	from ~/.rbenv/versions/2.2.2/bin/jekyll:23:in `load'
	from  .rbenv/versions/2.2.2/bin/jekyll:23:in `<main>'
```

I found this to be a known issue (see [this](dtao/safe_yaml#67), [this](http://stackoverflow.com/questions/29245100/github-pages-error-running-jekyll-locally) and [this](osgi/osgi.enroute.site#8)), and was able to start the application by
running `bundle update jekyll`.

duopixel added a commit to cabify/cabify_developers that referenced this issue May 29, 2015

tdooner added a commit to tdooner/synapse that referenced this issue Oct 10, 2015

Make the tests pass after merging upstream/master
A bit has changed - mostly adding the ServiceWatcher class in the
hierarchy.

safe_yaml needs upgraded because of:
dtao/safe_yaml#67

hale added a commit to opencounter/accela-rest-ruby that referenced this issue Nov 18, 2015

pachirel added a commit to pachirel/kawasakirb.github.io that referenced this issue Nov 30, 2015

Update bundled gems to work with ruby 2.2.2
At least, safe_yaml should be 1.0.4 for ruby >= 2.2.0
dtao/safe_yaml#67
@willgdjones

This comment has been minimized.

Show comment
Hide comment
@willgdjones

willgdjones Dec 3, 2015

Getting this error again with Ruby 2.2.3 and safe_yaml 1.0.3 and running jekyll 2.5.3

willgdjones commented Dec 3, 2015

Getting this error again with Ruby 2.2.3 and safe_yaml 1.0.3 and running jekyll 2.5.3

@noroot

This comment has been minimized.

Show comment
Hide comment
@noroot

noroot Dec 15, 2015

confirm, bug still appears, ~/.rvm/gems/ruby-2.2.3/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:inmodule:SafeYAML': undefined method tagged_classes' for Psych:Module (NoMethodError)

noroot commented Dec 15, 2015

confirm, bug still appears, ~/.rvm/gems/ruby-2.2.3/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:inmodule:SafeYAML': undefined method tagged_classes' for Psych:Module (NoMethodError)

@noroot

This comment has been minimized.

Show comment
Hide comment
@noroot

noroot Dec 15, 2015

ixed with 1.0.4 safe_yaml version

noroot commented Dec 15, 2015

ixed with 1.0.4 safe_yaml version

carvil pushed a commit to alphagov/content-tagger that referenced this issue Jul 20, 2016

Upgrade ruby to 2.2.2
Needed to bump safe_yaml to get fix for
dtao/safe_yaml#67

floehopper added a commit to freerange/webhooks that referenced this issue Sep 27, 2016

Upgrade safe_yaml from 1.0.3 to 1.0.4 so app works in Ruby v2.2.5
I was seeing the problem described in dtao/safe_yaml#67.

Upgrading to v1.0.4 fixes this.

ota42y pushed a commit to ota42y/safe_yaml that referenced this issue Aug 14, 2017

mshenfield pushed a commit to mshenfield/CutePets that referenced this issue Sep 23, 2017

Issue 58: Bump ruby version to 2.4.2
Closes #58. 2.4.2 is the latest version of ruby [supported by Heroku](https://devcenter.heroku.com/articles/ruby-support#supported-runtimes). The current version is causing deploys of this app to Heroku to fail.

This also updates various dependencies in the lockfile using `bundle update #{name}` because of issues related to newer versions of ruby.

- `json` [⚠](flori/json#286)
- `safe_yaml` [⚠](dtao/safe_yaml#67)
- `webmock` [⚠] (bblimke/webmock#683)

For folks that have this checked out locally, I also had to `brew install --force` to force an up to date build of `http_parse.rb`, which was throwing `Symbol not found: _rb_cFixnum`.

Finally, this updates petharbor cassette to include URL encoded quotes - this is probably just an internal change to `URI.encode_www_form`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment