I’m a Java programmer trying for the first time to use JRuby with
eclipse. (I’m using Aptana plugin.)
I downloaded the .exe file of the latest JRuby, and Eclipse Java DLTK -
Ruby Development Tools. I installed both of them.
Then I set Ruby’s interpreter in eclipse to jruby.bat, and the engine
debugger to be Ruby Built-In Debugger.
I wrote a simple Ruby code which compiled neatly and afterwards added:
require ‘java’
I get an error message:
C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- java (LoadError) from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from C:/Users/eternalStudent/workspace/LetsTryRuby/HelloWorld.rb:1:in
`’
I found out what the problem was, my project was created with Aptana
plugin which can only run as Ruby Application, the Eclipse Java DLTK -
Ruby Development Tools I installed later allowed for a different kind of
interpreter, and allow me to run the code as Ruby Script with the JRuby
interpreter.
So I apparently I can run JRuby as long as I remember not to use the
previous plugin.
Thanks for those who tried to help, my deep appreciations.
Unfortunately I do not use Eclipse. Is there a place in the IDE to set
the
path to JRuby SDK? Perhaps the default path is still configured for ruby
2.1