You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this has something to do with Psych 4.0.4 (ruby/psych#487 ?). Just changing rehash.rb line 256 to use #safe_load is not enough and I'm not sure which permitted_classes need to be specified (for me personally, YAML.safe_load(f, permitted_classes: [OpenStruct, Pathname]) worked).
Backtrace:
/home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/class_loader.rb:99:in `find': Tried to load unspecified class: OpenStruct (Psych::DisallowedClass)
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/class_loader.rb:28:in `load'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:424:in `resolve_class'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:213:in `visit_Psych_Nodes_Mapping'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
from /home/jrs/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
from /home/jrs/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:265:in `block in build_ruby_profiles'
from /home/jrs/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:264:in `open'
from /home/jrs/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:264:in `open'
from /home/jrs/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:264:in `build_ruby_profiles'
from /home/jrs/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:460:in `<main>'
Perhaps related?
❯ rbenv version
3.1.2 (set by /home/jrs/testdir/.ruby-version)
❯ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
❯ rbenv bundler on
rbenv: ruby: command not found
The `ruby' command exists in these Ruby versions:
3.1.2
The text was updated successfully, but these errors were encountered:
I believe this has something to do with Psych 4.0.4 (ruby/psych#487 ?). Just changing
rehash.rb
line 256 to use#safe_load
is not enough and I'm not sure whichpermitted_classes
need to be specified (for me personally,YAML.safe_load(f, permitted_classes: [OpenStruct, Pathname])
worked).Backtrace:
Perhaps related?
The text was updated successfully, but these errors were encountered: