On Aug 20, 2008, at 8:06 AM, Axel Etzold wrote:

> Dear all,
>
> I am having trouble loading a gem in Jruby, Ubuntu 8.04 persistently  
> says it can't find it:
>
> /usr/local/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/ 
> custom_require.rb:27:in `require': no such file to load --  
> profligacy/swing (LoadError)
>
> swing.rb is here on my system:
>
> /usr/local/jruby-1.1.3/samples/minijava/swing.rb
> /usr/local/profligacy-1.0/lib/profligacy/swing.rb
> /usr/local/lib/ruby/gems/1.8/gems/profligacy-1.0-java/lib/profligacy/ 
> swing.rb
>
> ------------------------------------------------------------------------------------
>
> It tried changing the PATH variable in .bashrc, but still, it  
> doesn't work.
>
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ 
> games:/usr/local/jruby-1.1.3/bin
>
> Is there something special that one has to do in JRuby to find gems ?

Axel,
Ruby's gems and JRuby's gems are normally not in the same location. I  
believe JRuby uses jgem now. If not, you can symlink your gem script  
to jgem. Make sure that profligacy is installed with jgem install  
profligacy (or whatever the name of the gem is). It's common for  
myself and those at the office to mix this up and we've had a few of  
the Monkeybars users experience the same issue.

By the way, if get a chance, I'd look at Monkeybars for JRuby GUI  
development: http://monkeybars.rubyforge.org/
We're still keeping watch over it, and you can also find us on  
freenode in #monkeybars if you need any help.

-Logan