Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Unable to call Java from a Ruby Script
Trupti Deshpande
8/9/2006 4:36:00 PM
I am trying to call a java class from my ruby script. I have installed
JRuby and JRUBY_HOME and JAVA_HOME environment variables are pointing
to the correct locations. However I am not able to run a ruby file which
uses watir using jruby.
If I use this command java -jar jruby.jar myrubyfile.rb , it gives the
following error
*********************************************************
myrubyfile.rb:2:in `require': No such file to load -- watir (LoadError)
from myrubyfiles.rb:2
************************************************************
Even if I dont use watir it throws a similar error for the rest of the
ruby files used in the script ,like require 'test/unit' from the testing
framework
If I just run the script with the script name from the command prompt,
it gives the following error.
*******************************************************************
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_re
quire': no such file to load -- java (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
from myrubyfiles.rb:2
*******************************************************************
I know this is some sort of classpath error , however everything seems
to have been set, its still not working . What do you think is going
wrong??
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Unable to call Java from a Ruby Script
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password