rubygems local install

A

andy

This is part question - part comment...

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.

following these instructions..
<http://docs.rubygems.org/read/chapter/3#page83>

when doing install step.. (ruby setup.rb install)

I kept getting a directory not found error related to line 71 of
"rubygems-0.9.0/post-install.rb".

( Dir.chdir("pkgs/sources") do )

when I changed this line to...

( 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? Is there a directory path I'm neglecting
to set properly? Or do other people also hack through this bit?

Any help is much appreciated.

Thank You,

Andy Koch
 
A

andy

Further Problems with this topic...

My initial effort involved a Debian machine that had the rubygems
package previously installed. Thus I believe my success was a false
positive.

Repeating the process listed in
<http://docs.rubygems.org/read/chapter/3#page83> on a ruby/rubygems
"clean" Debian box, I consistently get the error...

/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?

regards,

Andy Koch
 
J

Jeremy Henty

I installed rubygems to /data/rubygems and added this to my
environment:

RUBYLIB=/data/rubygems/lib/ruby/site_ruby/1.8

Any use?

Jeremy Henty
 
K

Ken Bloom

This is part question - part comment...

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.

--Ken
 
A

andy

Hi Jeremy,

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 Koch
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top