Skip to content

"Gem Load Error is: can't modify frozen Hash" when openssl >= 4.0.0 #366

@KieranP

Description

@KieranP

Vault Ruby 0.19.0+
Openssl 4.0.0+

Upgraded from openssl 3.3.2 to recently released 4.0.0. And application broke with the following:

/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/bundler/runtime.rb:75:in 'block (2 levels) in Bundler::Runtime#require': There was an error while trying to load the gem 'vault'. (Bundler::GemRequireError)
Gem Load Error is: can't modify frozen Hash: {verify_mode: 1, verify_hostname: true, options: 2147614800}
Backtrace for gem load error is:
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/vault-0.19.0/lib/vault.rb:25:in 'block in Vault.setup!'
<internal:kernel>:91:in 'Kernel#tap'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/vault-0.19.0/lib/vault.rb:24:in 'Vault.setup!'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/vault-0.19.0/lib/vault.rb:53:in '<main>'
<internal:/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'
<internal:/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel.replace_require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/zeitwerk-2.7.4/lib/zeitwerk/core_ext/kernel.rb:34:in 'Kernel.require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/bundler/runtime.rb:63:in 'block (2 levels) in Bundler::Runtime#require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/bundler/runtime.rb:58:in 'Array#each'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/bundler/runtime.rb:58:in 'block in Bundler::Runtime#require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/bundler/runtime.rb:52:in 'Array#each'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/bundler/runtime.rb:52:in 'Bundler::Runtime#require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/site_ruby/3.4.0/bundler.rb:214:in 'Bundler.require'
/Users/kieran/work/config/application.rb:9:in '<main>'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/bootsnap-1.19.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command/actions.rb:15:in 'Rails::Command::Actions#require_application!'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command/environment_argument.rb:31:in 'Rails::Command::EnvironmentArgument#require_application!'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command/actions.rb:19:in 'Rails::Command::Actions#boot_application!'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/commands/console/console_command.rb:86:in 'Rails::Command::ConsoleCommand#perform'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/thor-1.4.0/lib/thor/command.rb:28:in 'Thor::Command#run'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/thor-1.4.0/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command/base.rb:178:in 'Rails::Command::Base#invoke_command'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/thor-1.4.0/lib/thor.rb:538:in 'Thor.dispatch'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command/base.rb:73:in 'Rails::Command::Base.perform'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command.rb:65:in 'block in Rails::Command.invoke'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command.rb:143:in 'Rails::Command.with_argv'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/command.rb:63:in 'Rails::Command.invoke'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/commands.rb:18:in '<main>'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
/Users/kieran/.asdf/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/gems/bootsnap-1.19.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require'
bin/rails:4:in '<main>'

Evidently this gem relies on functionality no longer permitted in openssl 4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions