Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
tmornini opened this Issue · 11 comments

5 participants

@tmornini
Collaborator

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)

Backtrace:

      Kernel(Module)#dump (method_missing) at kernel/delta/kernel.rb:78
       Guard::Notifier(Module)#notifiers= at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/guard-2.3.0/lib/guard
                                             /notifier.rb:81
 Guard::Notifier(Module)#_auto_detect_notification at /Users/tmornini/.rbenv/versions
                                                      /rbx-2.2.4/gems/gems/guard-2.3.0/lib
                                                      /guard/notifier.rb:207
          Guard::Notifier(Module)#turn_on at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/guard-2.3.0/lib/guard
                                             /notifier.rb:97
   Guard::Setuper(Module)#_setup_notifier at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/guard-2.3.0/lib/guard
                                             /setuper.rb:236
             Guard::Setuper(Module)#setup at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/guard-2.3.0/lib/guard
                                             /setuper.rb:67
           Guard::Commander(Module)#start at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/guard-2.3.0/lib/guard
                                             /commander.rb:24
                         Guard::CLI#start at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/guard-2.3.0/lib/guard/cli.rb:101
                        Thor::Command#run at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/thor-0.18.1/lib/thor/command.rb:27
 Thor::Invocation(Guard::CLI)#invoke_command at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                                /gems/gems/thor-0.18.1/lib/thor
                                                /invocation.rb:120
                            Thor.dispatch at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/thor-0.18.1/lib/thor.rb:363
    Thor::Base::ClassMethods(Class)#start at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/thor-0.18.1/lib/thor/base.rb:439
                        Object#__script__ at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/gems/guard-2.3.0/bin/guard:6
                       Kernel(Object)#load at kernel/common/kernel.rb:447
                        Object#__script__ at /Users/tmornini/.rbenv/versions/rbx-2.2.4
                                             /gems/bin/guard:23
          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
@YorickPeterse

This might be similar to #2913.

@brixen
Owner

@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.

@whatasunnyday

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.

@whatasunnyday

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

@whatasunnyday whatasunnyday referenced this issue in travis-ci/travis-ci
Closed

Ruby builds failing under Rubinius 2.2.4 #1929

@razielgn

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/chruby.sh"

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.sh"
chruby "rbx"

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

@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

That explains a lot! Thanks.

@YorickPeterse

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

@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.

@YorickPeterse

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

@tmornini
Collaborator

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.