# Rjb load errors, although installed

**URL:** <https://www.ruby-forum.com/t/rjb-load-errors-although-installed/130637>\
**Category:** Ruby\
**Created:** [March 1, 2008, 1:10am UTC](https://www.ruby-forum.com/t/rjb-load-errors-although-installed/130637 "2008-03-01T01:10:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scootiepuff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@scootiepuff](https://www.ruby-forum.com/u/scootiepuff)\
**Post date:** [March 1, 2008, 1:10am UTC](https://www.ruby-forum.com/t/rjb-load-errors-although-installed/130637/1 "2008-03-01T01:10:42Z")

</div>

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

> > require ‘rjb’  
> > =\> true
> 
> > require ‘net/smtp’  
> > =\> 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.

---

<div class="post-metadata">

**Author:** ![scootiepuff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@scootiepuff](https://www.ruby-forum.com/u/scootiepuff)\
**Post date:** [March 1, 2008, 1:47am UTC](https://www.ruby-forum.com/t/rjb-load-errors-although-installed/130637/2 "2008-03-01T01:47:42Z")

</div>

Does require ‘rubygems’ before require ‘rjb’ fix it?

Arlen

---

<div class="post-metadata">

**Author:** ![scootiepuff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@scootiepuff](https://www.ruby-forum.com/u/scootiepuff)\
**Post date:** [March 1, 2008, 2:32am UTC](https://www.ruby-forum.com/t/rjb-load-errors-although-installed/130637/3 "2008-03-01T02:32:14Z")

</div>

On Feb 29, 4:45 pm, Arlen C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [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.
