rbenv-bundler
rbenv-bundler copied to clipboard
Issue with psych/ostruct under Ruby 2.3
Starting to play with Ruby 2.3 and running into a bit of a mess with rbenv-bundler:
$ rbenv bundler on
/home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/ostruct.rb:175:in `respond_to_missing?': undefined method `key?' for nil:NilClass (NoMethodError)
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:380:in `respond_to?'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:380:in `init_with'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:373:in `revive'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:207:in `visit_Psych_Nodes_Mapping'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/visitor.rb:15:in `visit'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/visitor.rb:5:in `accept'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:31:in `accept'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:337:in `block in revive_hash'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:335:in `each'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:335:in `each_slice'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:335:in `revive_hash'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:161:in `visit_Psych_Nodes_Mapping'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/visitor.rb:15:in `visit'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/visitor.rb:5:in `accept'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:31:in `accept'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:310:in `visit_Psych_Nodes_Document'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/visitor.rb:15:in `visit'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/visitor.rb:5:in `accept'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:31:in `accept'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych/nodes/node.rb:37:in `to_ruby'
from /home/mwp/.rbenv/versions/2.3.0-preview2/lib/ruby/2.3.0/psych.rb:252:in `load'
from /home/mwp/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:267:in `block in build_ruby_profiles'
from /home/mwp/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:266:in `open'
from /home/mwp/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:266:in `open'
from /home/mwp/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:266:in `build_ruby_profiles'
from /home/mwp/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:455:in `<main>'
Everything was working fine under Ruby 2.2.3! Not sure where to begin with this. Using the latest release of Bundler and current head of rbenv and rbenv-bundler.
There is more debugging info reported here https://github.com/rbenv/rbenv/issues/845#issue-123954588
It was an issue in Ruby itself that has been fixed with https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/53366