I understand that to add the path to $ LOAD_PATH just
$LOAD_PATH.unshift(path)
But I have to add this line to every program I write. Is there any way to add it to the system level?
I tried searching a little while running the script for Ruby, but could not find the answer. I tried adding this line to kernel/common/module.rb
, ruby_constants.rb
, loader.rb
, etc. but does not work.
In which file should this line be added?
Update:
I am using ubuntu 10.04 and Rubinius. The system variable is not called RUBYLIB
.
I tried to create one, but did not work. But I understand that I made a mistake, and forgot to add a variable to the bash script .bashrc
. After adding the variable, everything works fine!
source share