rubocop: No longer starts up: "private method `load' called for Psych:Module"

I get this error when executing rubocop without options. I do get help output without crashing, for the --help option. I have no rubocop config file.

$ rubocop -V
0.28.0 (using Parser 2.2.0.pre.8, running on ruby 2.1.5 x86_64-darwin14.0)

$ rubocop 
private method `load' called for Psych:Module
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/config_loader.rb:34:in `load_file'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/config_loader.rb:93:in `configuration_from_file'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/config_store.rb:40:in `for'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:111:in `excluded_dirs'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:90:in `find_files'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:60:in `target_files_in_dir'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:31:in `find'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/runner.rb:47:in `find_target_files'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/runner.rb:18:in `run'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/lib/rubocop/cli.rb:24:in `run'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/bin/rubocop:13:in `block in <top (required)>'
/Users/robb/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/Users/robb/.rvm/gems/ruby-2.1.5/gems/rubocop-0.28.0/bin/rubocop:12:in `<top (required)>'
/Users/robb/.rvm/gems/ruby-2.1.5/bin/rubocop:23:in `load'
/Users/robb/.rvm/gems/ruby-2.1.5/bin/rubocop:23:in `<main>'
/Users/robb/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/Users/robb/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted comments

Two installed psych gems causes this bug: /home/user/.gem/ruby/2.2.0/gems/psych-2.0.13 /usr/lib/ruby/2.2.0/psych.rb

Solution: gem uninstall psych

FYI: this is a rubygems bug. gem update --system will help you.