• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
e_ext/kernel_require.rb:51
(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.

Regards
Mahesh


 
Mahesh Chandran
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic