I’m installing a local (non-root) gems. I’ve succeeded in doing this,
however I had a problem I thought I might bring to the attention of the
community.
First… installing on a Debian testing distro. Ruby installed via
apt-get.
( Dir.chdir("/home/my_user/rubygems-0.9.0/pkgs/sources") do )
then it all worked.
But I get real nervous when I need to change code like that, mostly for
future maintenance reasons.
Am I doing something wrong?
The initial launch assumes that you are in your home directory
(/home/local_user). If you are not, this error will come up. You were
not
in your home directory.
/home/andy/mystuff/bin/gem:9:in ‘require’: no such file to load –
rubygems (LoadError)
from /home/andy/mystuff/bin/gem:9
I would interpret this as the ruby not finding the rubygems.rb file.
However, I’ve followed the instructions precisely - several times.
Unless I install the Debian package libgems-ruby1.8, I get this error.
But this defeats the purpose of a user install ruby gems.
Any thoughts on what I’m missing? Or misunderstanding?
I’m installing a local (non-root) gems. I’ve succeeded in doing this,
however I had a problem I thought I might bring to the attention of the
community.
I have a system where rubygems is installed systemwide by root (so the
rubygems library, and binaries are systemwide), and I set GEM_HOME to
/home/bloom/.gems, installed the sources gem locally, and consequently
have a local gem directory.
Setting RUBYLIB was the piece I’ve been missing, thanks for the
insight.
Ken,
I tried the system rubygems. However, I have some ruby scripts that
needed to start on boot and this caused grief as they kept failing when
they looked only in standard rubygem dir and didn’t find the rubygems I
installed as local user.
By setting PATH, GEM_HOME and RUBYLIB in my boot scripts they
correctly locate my local user ruby gems.
Many thanks,
Andy K.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.