简体   繁体   中英

JRuby Load Error when running Rails server

I updated my Ruby version to 3.1.3, but I was keep getting the following error and could not fix it, so I downgraded Ruby version back to 3.1.2.

However, I am keep getting the same error and I tried reinstalling all the gems and updating all the gems, but still getting the error. I would really appreciate if someone can help me out because I could not figure this out for very long time. I don't think I need to install JRuby separately or something because it used to work fine.

Thanks in advance!

20:23:24 web.1  | C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require': cannot load such file -- jruby (LoadError)
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jruby-openssl-0.9.4/lib/jopenssl/load.rb:13:in `<main>'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jruby-openssl-0.9.4/lib/openssl.rb:1:in `<main>'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/key_generator.rb:4:in `<main>'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/application.rb:6:in `<main>'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails.rb:13:in `<main>'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:24 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/commands/server/server_command.rb:5:in `<main>'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command/behavior.rb:44:in `block (2 levels) in lookup'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command/behavior.rb:40:in `each'        
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command/behavior.rb:40:in `block in lookup'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command/behavior.rb:39:in `each'        
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command/behavior.rb:39:in `lookup'      
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:73:in `find_by_namespace'    
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:46:in `invoke'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
20:23:25 web.1  |       from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_requ        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in `start'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/bin/foreman:7:in `<top (required)>'        from C:/Ruby31-x64/bin/foreman:32:in `load'
        from C:/Ruby31-x64/bin/foreman:32:in `<main>'

It seems like one of the gems was causing the problem. I rolled back everything to before state and the server is working again.

The gem was gem 'google-auth'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM