In Ubuntu, I have to install a program into my home directory because I
do
not have the privilege to install in the usr/local/bin and usr/local/lib
directory.
~/OT/usr/local/lib/site_ruby/.so # many so files
~/OT/usr/local/lib/site_ruby/1.8/
~/OT/usr/local/lib/site_ruby/1.8/x86_64-linux/.so #
includes many .so files
~/OT/usr/local/lib/site_ruby/1.8/OT.rb
load a number of *.so files located in “x86_64-linux/”
~/OT/usr/local/lib/site_ruby/1.8/OT/RT/RT.rb
RT.rb has " require ‘OT’ "
There are load errors in RT.rb and OT.rb
It works perfectly if I put in the /usr/local directory instead of home
but
I do not have the permission.
I have add system search path ~/OT/usr/local/lib/site_ruby/1.8/
and ~/OT/usr/local/lib/site_ruby/1.8/x86_64-linux/ but it still does not
work.
So my question is that how to configure to make the ruby or system
search
the lib and .rb files? I use tcsh.
Why don’t you try RVM. It will save you from dealing with many
circumstances that need ‘root privs’ and deals with all the paths and
snags that you’re trying to solve.
The original request mentioned they were using tcsh. For tcsh do
if you don’t have RUBYLIB env variable set
setenv RUBYLIB /some/install/path/lib
if you already have RUBYLIB set
setenv RUBYLIB /some/install/path/lib:#{RUBYLIB}
Ruby will grab what is in your RUBYLIB variable, and prepend them.
I’m sure since the author wasn’t able to install libraries to the
machine, they would also no be able to edit the /etc/profile(only used
by bash by the way)