Any time I try to run gem command, this error appears.
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
I am using rvm and I have already tried to rvm implode and reinstall rvm and jruby. But this error still persists.
Any help on how to solve it would be much appreciated.
Reinstalling jruby and java has solved this problem.