Jruby: unable to install gems, failing with undefined class/module YAML::Syck::DefaultKey
The console output pretty much speaks for itself:
$ java -jar jruby-complete-1.6.4.jar -S gem install nokogiri --no-rdoc --no-ri
Fetching: nokogiri-1.5.0-java.gem (100%)
Successfully installed nokogiri-1.5.0-java
1 gem installed
11:17:04|dkowis@racktop jruby
$ java -jar jruby-complete-1.6.4.jar -S gem install cucumber --no-rdoc --no-ri
ERROR: While executing ge开发者_如何学运维m ... (ArgumentError)
undefined class/module YAML::Syck::DefaultKey
11:18:24|dkowis@racktop jruby
$ java -jar jruby-complete-1.6.4.jar -S gem install cuke4duke --version=0.4.4 --no-rdoc --no-ri
ERROR: While executing gem ... (ArgumentError)
undefined class/module YAML::Syck::DefaultKey
There's a couple gems I can install, but the ones I need, I cannot. Is it a problem with the gem itself? Is it a problem with rubygems? I'm not able to puzzle this one out.
This apparently is a known issue with Rubygems reported here on the JRuby Forum.
There is a pull request to fix this Rubygems error, but you could try build the gems you want locally and correct the dependency statements in the gemspec file yourself. I had ran into the same problem with the i18n-js gem.
Hope this helps.
精彩评论