简体   繁体   English

运行 Rails 服务器时 JRuby 加载错误

[英]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.我将我的 Ruby 版本更新到 3.1.3,但我一直收到以下错误并且无法修复它,所以我将 Ruby 版本降级回 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.但是,我不断收到相同的错误,我尝试重新安装所有的 gem 并更新所有的 gem,但仍然收到错误。 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.我认为我不需要单独安装 JRuby 或其他东西,因为它过去工作正常。

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'宝石是gem 'google-auth'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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