宝石命令每次都抛出运行时错误并提及缺少的jar

时间:2018-07-12 09:05:16

标签: ruby rubygems jruby snakeyaml

每次尝试运行gem命令时,都会出现此错误。

RuntimeError: 

you might need to reinstall the gem which depends on the missing jar 

or in case there is Jars.lock then JARS_RESOLVE=true will install the missing jars

no such file to load -- org/yaml/snakeyaml/1.18/snakeyaml-1.18 (LoadError)
              do_require at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/jar_dependencies.rb:289
             require_jar at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/jar_dependencies.rb:208
  require_jar_with_block at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/jar_dependencies.rb:0
             require_jar at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/jar_dependencies.rb:207
             require_jar at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/jar_dependencies.rb:298
                  (root) at /home/petr/.rvm/gems/jruby-1.7.21/gems/psych-2.2.4-java/lib/psych_jars.rb:5
                 require at org/jruby/RubyKernel.java:1040
                 require at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
                  (root) at /home/petr/.rvm/gems/jruby-1.7.21/gems/psych-2.2.4-java/lib/psych.rb:1
                 require at org/jruby/RubyKernel.java:1040
                 require at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
                  (root) at /home/petr/.rvm/gems/jruby-1.7.21/gems/psych-2.2.4-java/lib/psych.rb:5
                  (root) at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/rubygems.rb:1
               load_yaml at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/rubygems.rb:609
               load_file at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/rubygems/config_file.rb:328
              initialize at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/rubygems/config_file.rb:197
        do_configuration at /usr/share/rvm/rubies/jruby-1.7.21/lib/ruby/shared/rubygems/gem_runner.rb:74
                    load at org/jruby/RubyKernel.java:1059
                  (root) at /usr/share/rvm/rubies/jruby-1.7.21/bin/gem:4

我正在使用rvm,并且我已经尝试过rvm爆破并重新安装rvm和jruby。但是此错误仍然存​​在。

对于解决问题的任何帮助,将不胜感激。

1 个答案:

答案 0 :(得分:0)

重新安装jruby和java已解决了此问题。