Skip to content
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

undefined method `add_builtin_type' on Psych (Module) (NoMethodError) using Rubinius 2.2.3 #181

Closed
derekstavis opened this issue Jan 22, 2014 · 4 comments

Comments

@derekstavis
Copy link

I'm trying to use Grape API Builder from a skeleton project:

https://github.com/mepatterson/goliath-skeleton

$ rvm --version
rvm 1.25.15 (stable

$ rbx --version
rubinius 2.2.3 (2.1.0 4792e746 2013-12-29 JI) [x86_64-linux-gnu]

$ bundle | grep psych
Using psych (2.0.2)

The stack trace when I run the server:

An exception occurred running app.rb:

    undefined method `add_builtin_type' on Psych (Module) (NoMethodError)

Backtrace:

  Kernel(Module)#add_builtin_type (method_missing) at kernel/delta/kernel.rb:78
                                Object#__script__ at /home/derek/.rvm/gems/rbx-2.2.3@ggskel/gems/activesupport-3.2.16/lib/active_support
                                                     /ordered_hash.rb:8
                      Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                            Kernel(Object)#require at kernel/common/kernel.rb:705
                                 Object#__script__ at /home/derek/.rvm/gems/rbx-2.2.3@ggskel/gems/grape-0.6.1/lib/grape.rb:10
                      Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                            Kernel(Object)#require at kernel/common/kernel.rb:705
                                 Object#__script__ at app.rb:8
                  Rubinius::CodeLoader#load_script at kernel/delta/code_loader.rb:66
                  Rubinius::CodeLoader.load_script at kernel/delta/code_loader.rb:201
                           Rubinius::Loader#script at kernel/loader.rb:649
                             Rubinius::Loader#main at kernel/loader.rb:831
@tenderlove
Copy link
Member

Does it work with MRI? I'm not sure this is a Psych bug. /cc @dbussink

@dblock
Copy link

dblock commented Jan 9, 2015

This was brought up by someone else in ruby-grape/grape#327 (comment), everything definitely works with MRI, but I haven't seen a repro yet for the issue at hand. Maybe @derekstavis you can help?

@derekstavis
Copy link
Author

@dblock, at the time of comment I could reproduce the error just by creating a rvm gemset based on rbx and running the said project. I haven't followed up with it though, so I don't know if it was actually fixed.

@zedtux
Copy link

zedtux commented Feb 1, 2015

I'm facing this issue too by doing the following:

  1. With RVM install ruby 2.2.0
  2. brew install graphviz
  3. gem install rails-erd
  4. Run erd in a Rails project

I have then the following error:

erd
/Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd/diagram/graphviz.rb:77: warning: duplicated key at line 83 ignored: :fontsize
/Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.21/lib/active_support/ordered_hash.rb:8:in `<top (required)>': undefined method `add_builtin_type' for Psych:Module (NoMethodError)
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.21/lib/active_support/ordered_options.rb:1:in `<top (required)>'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd.rb:1:in `<top (required)>'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd/domain.rb:1:in `<top (required)>'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd/diagram.rb:1:in `<top (required)>'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd/diagram/graphviz.rb:2:in `<top (required)>'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd/cli.rb:132:in `initialize'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd/cli.rb:126:in `new'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/lib/rails_erd/cli.rb:126:in `start'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/gems/rails-erd-1.2.2/bin/erd:4:in `<top (required)>'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/bin/erd:23:in `load'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/bin/erd:23:in `<main>'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
  from /Users/guillaumehain/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants