每当我尝试运行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。但这个错误仍然存在。
如有任何关于如何解决这一问题的帮助,我们将不胜感激。
重新安装jruby和java解决了这个问题。