It looks that jruby-1.7.16 does not work correctly on SunOS 5.10. At least it looks like its impossible to install additional gems.
When I try to run jgem I get the following error:
NoMethodError: undefined method `name' for nil:NilClass
_resort! at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems/specification.rb:717
sort! at org/jruby/RubyArray.java:3358
_resort! at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems/specification.rb:716
_all at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems/specification.rb:665
each at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems/specification.rb:855
reverse_each at org/jruby/RubyEnumerable.java:1072
latest_specs at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems/specification.rb:971
find_latest_files at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems.rb:490
load_plugins at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems.rb:1006
(root) at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems/gem_runner.rb:81
require at org/jruby/RubyKernel.java:1065
(root) at /export/home/my_user/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
(root) at ./jgem:9
I tried to use the same distribution on Ubuntu LTS 12.04.4 and it works correctly, gems could be installed.
I installed required gems in Ubuntu, packed jruby and moved to SunOS machine and it didn't help.
Is SunOS 5.1 fully supported by jruby? jruby and irb seem to run fine, but jgem is critical for me.
===== EDIT: These are gems that I found in jruby install
ls
axiom-types-0.1.1 equalizer-0.0.9 rake-10.1.0 ruby-maven-libs-3.1.1
coercible-1.0.0 ice_nine-0.11.0 rdoc-4.0.1 thread_safe-0.3.4-java
descendants_tracker-0.0.4 maven-tools-1.0.5 ruby-maven-3.1.1.0.8 virtus-1.0.3
And I added puts in front of the line you mentioned and for a.name and b.name, it looks that error happened when after virtus was compared to thread_safe:
a = virtus
b= thread_safe
1
NoMethodError: undefined method `name' for nil:NilClass