• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Error while calling ruby code using JRuby in Eclipse Aptana Studio 3 Terminal View

Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a set of ruby code (which is actually a gem that I extracted and the lib folder contains a bunch of .rb (ruby code). I have Eclipse Aptana Studio 3 plugin setup and have JRuby

$ jruby -v
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.
6.0_45-b06 [Windows 7-amd64]

I need to execute a ruby file: /lib/my_rubycaller.rb, which is like the following:

Now at the Aptana Studio 3 Terminal View, I typed the following:

$ jruby -S lib/my_rubycaller.rb
LoadError: no such file to load -- somedependency
require at org/jruby/RubyKernel.java:1054
require at c:/Users/mkorapat/MyProjects/jruby-1.7.4/lib/ruby/shared/rubygems/cor
(root) at my_rubycaller.rb:11

Inside my_rubycaller @ line# 11, I have the require statement. I don't know what I am doing wrong. I am new to Ruby development, but since I am versatile with Eclipse, just stuck to Aptana and JRuby is just because I thought perhaps I could leverage some additional benefits that it has to offer. But it might still be a matter of time for me to go with Ruby as against JRuby, but still, I wonder how it will help me in this scenario.

Thanks in advance for the help.


Mahesh Chandran
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just changed require to require_relative - since apparently my JRuby version seems to use ruby 1.9 and I see that require_relative is the way to go. Refer to http://stackoverflow.com/questions/9750610/ruby-require-error-cannot-load-such-file. So long so good. Thanks.
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!