rjb load errors, although installed

S

scootiePuff

hallo!

i'm unable to use "require 'rjb'" successfully, although rjb appears
to have installed successfully.

i am using ruby 1.8.6, irb 0.9.5, java 1.5.0, rjb 1.1.2, and os x
10.5.2.

i was able to use the require line just fine via irb:

gir:dev$ which irb
/usr/bin/irb

gir:dev$ irb --version
irb 0.9.5(05/04/13)

gir:dev$ irb=> true
[..]


but i was unable to run the 'require' line from within my own test
script:

gir:dev$ cat ./test.rb
#!/usr/bin/env ruby

require 'rjb'

puts 'is this working?'

gir:dev$ ./test.rb
../test.rb:3:in `require': no such file to load -- rjb
(LoadError)from ./test.rb:3


i run 'gem list rjb' and 'gem content rjb', and rjb appears to be
installed:

gir$ gem list rjb
*** LOCAL GEMS ***

rjb (1.1.2, 1.1.1)

gir$ gem content rjb
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/RBridge.java
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/load.c
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/rjbexception.c
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/riconv.c
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/rjb.c
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/jniwrap.h
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/rjb.h
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/riconv.h
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/
jp_co_infoseek_hp_arton_rjb_RBridge.h
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/extconf.h
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/depend
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/data/rjb/jp/co/infoseek/hp/arton/
rjb/RBridge.class
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/lib/rjb.rb
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/samples/filechooser.rb
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/gctest.rb
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/test.rb
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/jp/co/infoseek/hp/arton/rjb/
ExtBase.class
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/jp/co/infoseek/hp/arton/rjb/
Test.class
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/jp/co/infoseek/hp/arton/rjb/
IBase.class
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/jp/co/infoseek/hp/arton/rjb/
Base.class
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/jp/co/infoseek/hp/arton/rjb/
Test$TestTypes.class
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/COPYING
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ChangeLog
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/readme.sj
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/readme.txt
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/ext/extconf.rb

i see the 'test.rb' file so i try to run that, to no avail:

gir$ sudo /Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/test.rb
/Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/test.rb:5:in `require': no
such file to load -- rjb (LoadError)
from /Library/Ruby/Gems/1.8/gems/rjb-1.1.2/test/test.rb:5

note i replaced the first line's 'local' to 'bin' (otherwise
interpreter doesn't exist):

gir$ head test.rb
#!/usr/bin/env ruby
# $Id: test.rb 58 2008-01-14 08:25:07Z kuwa1 $

require 'test/unit'
require 'rjb'

puts "start RJB(#{Rjb::VERSION}) test"
class TestRjb < Test::Unit::TestCase
include Rjb
def setup
[..]


eek! what am i overlooking? please advise.
 
A

Arlen Cuss

[Note: parts of this message were removed to make it a legal post.]

Does require 'rubygems' before require 'rjb' fix it?

Arlen
 
S

scootiePuff

[Note: parts of this message were removed to make it a legal post.]

Does require 'rubygems' before require 'rjb' fix it?

Arlen

yes indeed ! silly me.

thank you for taking the time to point me in the right direction.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top