Ruby CLASSPATH

S

Slaine

Hi all,

I have upgraded ruby on a Amazon EC2 instance. I trying to bundle it
now using the ruby program packaged with the AMI.
There seems to be something wrong now with loading required libraries.
When the main ruby program tries to load the first library I get the
following error :
`require': no such file to load -- ec2/amitools/bundle (LoadError)

This file is located in folder: /usr/lib/site_ruby/ec2/amitools/bundle

There seems to be something wrong with the path where ruby tries to
find external folders. Does anyone have any idea how I could add it?

Thanks for your help

BR,
 
J

Jeff Moore

matt said:
You can modify $: in your code before the require (it's an array, just
append to it). If this is to be a more permanent change you can modify
your environment's RUBYLIB.

m.

In the same vain you can run this:

ruby -e 'p $:'

To obtain the paths currently being searched...
 
M

matt neuburg

Jeff Moore said:
In the same vain you can run this:

ruby -e 'p $:'

To obtain the paths currently being searched...

Unless $: has *already* been altered by the load system. For example, on
Mac OS X using TextMate, saying ruby -e 'p $:' and asking for $: in code
will give two very different answers. So I recommend doing the latter.

m.
 
S

Slaine

Hi all,

Thanks for the suggestions. I have solved the issue by setting:

RUBYLIB=/usr/lib/site_ruby:/usr/lib/ruby/1.8

Afterwards there was still something wrong with reading openssl.so. I
solved this by manually adding a symbolic link in /usr/lib to /usr/
lib/ruby/1.8/i386-linux/openssl.so

Then, I apparently had to run the ec2-bundle tool from /usr/lib in
order to make it work.
Not a entirely elegant solution but it works for now.

BR,
 

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

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,118
Latest member
LatishaWhy
Top