Skip to content

Guard: undefined method `dump' on Psych (Module) (NoMethodError) #2919

tmornini opened this Issue Feb 5, 2014 · 11 comments

5 participants

tmornini commented Feb 5, 2014

Hey guys. Let me say that rbx-2.2.4 is looking really good. It's the first version of Rubinius that felt reasonably snappy. :-)

Still having an issue with Guard. This runs fine on JRuby and 2.1.0

For once, I'd be happy to give you access to this repo...

An exception occurred running /Users/tmornini/.rbenv/versions/rbx-2.2.4/gems/bin/guard:

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


      Kernel(Module)#dump (method_missing) at kernel/delta/kernel.rb:78
       Guard::Notifier(Module)#notifiers= at /Users/tmornini/.rbenv/versions/rbx-2.2.4
 Guard::Notifier(Module)#_auto_detect_notification at /Users/tmornini/.rbenv/versions
          Guard::Notifier(Module)#turn_on at /Users/tmornini/.rbenv/versions/rbx-2.2.4
   Guard::Setuper(Module)#_setup_notifier at /Users/tmornini/.rbenv/versions/rbx-2.2.4
             Guard::Setuper(Module)#setup at /Users/tmornini/.rbenv/versions/rbx-2.2.4
           Guard::Commander(Module)#start at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                         Guard::CLI#start at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                        Thor::Command#run at /Users/tmornini/.rbenv/versions/rbx-2.2.4
 Thor::Invocation(Guard::CLI)#invoke_command at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                            Thor.dispatch at /Users/tmornini/.rbenv/versions/rbx-2.2.4
    Thor::Base::ClassMethods(Class)#start at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                        Object#__script__ at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                       Kernel(Object)#load at kernel/common/kernel.rb:447
                        Object#__script__ at /Users/tmornini/.rbenv/versions/rbx-2.2.4
          Rubinius::CodeLoader#load_script at kernel/delta/code_loader.rb:66
          Rubinius::CodeLoader.load_script at kernel/delta/code_loader.rb:140
                   Rubinius::Loader#script at kernel/loader.rb:649
                     Rubinius::Loader#main at kernel/loader.rb:831
Rubinius member

This might be similar to #2913.

Rubinius member
brixen commented Feb 5, 2014

@tmornini could you provide a reduced Gemfile and the command line you are running since I'm not familiar with Guard? Or if it's easier, email me access to the repo.


I believe this problem isn't directly related to guard but is actually due to the failed installation of a gem dependency of guard. Since the dependency is never installed, the specs fail. The gem in question is docile and when you attempt to install it, it fails and throws private method 'load' called on Psych (Module). So if we can get docile working, Guard should be working.


I'm also having this problem while running bundle install after cloning the rubinius repo.

@sunnyrjuneja sunnyrjuneja referenced this issue in travis-ci/travis-ci Feb 6, 2014

Ruby builds failing under Rubinius 2.2.4 #1929

razielgn commented Feb 7, 2014

I think this error is showing up in different versions.
The most annoying one is private method 'load' called on Psych (Module): as soon as psych is installed by Rubygems, even gem uninstall psych gets broken by it.

I git bisect'd over the night from v2.2.0 to HEAD and it reported that commit 532c4be is responsible for misloading Psych.
I'm not sure how or why, though.

For reference, here's the git bisect script:

#!/usr/bin/env bash

source "/usr/local/share/chruby/"

set -e
set -x

rm -rf ~/.rubies/rbx
rm -rf ~/.gem/rbx

git clean -d -f -x

chruby "2.1.0"

bundle install -j 10
./configure --cc clang --cxx clang++ --llvm-config llvm-config-3.2 --prefix /home/razielgn/.rubies/rbx
rake install

source "/usr/local/share/chruby/"
chruby "rbx"

gem install psych
ruby -ryaml -e 'YAML.load "1"'
exit $?
Rubinius member

@brixen is working on this issue. From what I recall the problem is that RubyGems now loads C extensions before regular Ruby files (given they have the same names). This breaks a bunch of things by the looks of it (it's also the direct opposite of what MRI does/used to do).

razielgn commented Feb 7, 2014

That explains a lot! Thanks.

Rubinius member

571cc8d seems to've fixed this issue. If possible, could you give Rubinius master a try and see if it indeed solves the problem?

razielgn commented Feb 8, 2014

@brixen, could you release 2.2.5 this weekend? I think it was a major bug and a quick release may be good, especially for projects tested on Travis.

Rubinius member

2.2.5 has been released which should solve this problem. Feel free to re-open if the issue re-occurs.


2.2.5 does, indeed, resolve this issue. Thanks!

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.