Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using Ruby 3.1.0 : Psych::DisallowedClass: Tried to load unspecified class: Time #313

Closed
IanVaughan opened this issue Jan 4, 2022 · 2 comments

Comments

@IanVaughan
Copy link

Using Ruby 3.1.0 returns this error:

Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Time (Psych::DisallowedClass)
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/class_loader.rb:28:in `load'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/scalar_scanner.rb:109:in `parse_time'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/scalar_scanner.rb:52:in `tokenize'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:65:in `deserialize'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:128:in `visit_Psych_Nodes_Scalar'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
  from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/psych.rb:370:in `load'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config/sources/yaml_source.rb:20:in `load'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config/options.rb:38:in `block in reload!'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config/options.rb:37:in `each'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config/options.rb:37:in `reload!'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config.rb:48:in `load_files'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config.rb:56:in `load_and_set_settings'
	from /Users/ianvaughan/outfund/core-app/config/initializers/config.rb:61:in `<main>'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `block in require'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `require'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config/integrations/rails/railtie.rb:8:in `preload'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/railties-6.1.4.3/lib/rails/railtie.rb:207:in `public_send'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/railties-6.1.4.3/lib/rails/railtie.rb:207:in `method_missing'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/config-3.1.0/lib/config/integrations/rails/railtie.rb:21:in `block in <class:Railtie>'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/lazy_load_hooks.rb:51:in `each'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/activesupport-6.1.4.3/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/railties-6.1.4.3/lib/rails/application.rb:96:in `inherited'
	from /Users/ianvaughan/outfund/core-app/config/application.rb:11:in `<module:JustCapitalEnquiries>'
	from /Users/ianvaughan/outfund/core-app/config/application.rb:9:in `<top (required)>'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/application.rb:92:in `require'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/application.rb:92:in `preload'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
	from /Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
	from <internal:/Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/ianvaughan/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from -e:1:in `<main>'
@IanVaughan IanVaughan changed the title Error using 3.1.0 : Psych::DisallowedClass: Tried to load unspecified class: Time Error using Ruby 3.1.0 : Psych::DisallowedClass: Tried to load unspecified class: Time Jan 4, 2022
@IanVaughan
Copy link
Author

I guess its a dup of #306
I tested master @ c0588be locally it it went away.

@cjlarose
Copy link
Member

cjlarose commented Jan 5, 2022

Sorry about that! Published version 3.1.1 with the fixes from #306 to RubyGems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants