Use Ruby Gems from Java

Hi,
I want to run ruby code in my java project.
I can run it by using jruby. - (I have added the jar to my project)
Now I want to use ruby gems in my code. -The “require” word doesn’t
work.
Maybe I have to add the jars of them. How?
How can I run ruby code using gems from Java?

Thanks in advance
Rina

View this message in context:
http://old.nabble.com/Use-Ruby-Gems-from-Java-tp31808347p31808347.html
Sent from the JRuby - User mailing list archive at Nabble.com.

Did you remember to require rubygems somehow, such as (in Unix)

export RUBYOPT=rubygems

or, within ruby itself

require “rubygems”

Andrew

Sorry - misread the original question.

Andrew

Yes, if i write: require “rubygems”, it fails.-That’s the problem.
Did you succeed in using it from java?

Andrew Grimm-2 wrote:

Rina


View this message in context:
http://old.nabble.com/Use-Ruby-Gems-from-Java-tp31808347p31808398.html
Sent from the JRuby - User mailing list archive at Nabble.com.

On Thu, Jun 9, 2011 at 5:38 AM, RinaB [email protected] wrote:

Yes, if i write: require “rubygems”, it fails.-That’s the problem.
Did you succeed in using it from java?

Are you having trouble when running JRuby embedded in a Java
application, or just using JRuby standalone? I’ve never had any
problems loading gems when using JRuby standalone. The only time I
have had problems is when trying to embed JRuby, either by not using
jruby-complete.jar, not providing an appropriate filesystem GEM_HOME,
or when trying to load gems in an OSGi context.