Apache can't load/require rubygems

Hi,

I have rubygems installed in my home directory as I’d like to have
control over gems without requiring root access. I’m trying to deploy
a known working rails app on this machine but it falls down at the
“require ‘rubygems’” line in boot.rb. I have added the path to
rubygems to LOAD_PATH in environment.rb; this is confirmed by dumping
$: to a logfile right before the call to require:

W, [2006-05-30T11:10:03.040915 #13641] WARN – :
["/home/jhughes/lib/ruby/site_ruby/1.8",
“/usr/local/lib/ruby/site_ruby/1.8”,
“/usr/local/lib/ruby/site_ruby/1.8/i686-linux”,
“/usr/local/lib/ruby/site_ruby”, “/usr/local/lib/ruby/1.8”,
“/usr/local/lib/ruby/1.8/i686-linux”, “.”]

The contents of that first path in $::

ls -l /home/jhughes/lib/ruby/site_ruby/1.8
total 28
-rw-r–r-- 1 jhughes jhughes 492 May 19 16:06 gemconfigure.rb
drwxr-xr-x 2 jhughes jhughes 4096 May 19 16:06 rubygems
-rw-r–r-- 1 jhughes jhughes 12304 May 19 16:06 rubygems.rb
-rw-r–r-- 1 jhughes jhughes 131 May 19 16:06 ubygems.rb

I can require rubygems in irb and in console mode, but the apache
error_log consistently spits out the following:

[Tue May 30 11:10:03 2006] [error] [client 192.168.0.112]
/projects/active/pts/public/current/public/…/config/boot.rb:24:in
`load’: no such file to load –
/home/jhughes/lib/ruby/site_ruby/1.8/rubygems.rb (LoadError)

Obviously the wild card here is Apache, but I haven’t a clue why it
can’t open these files. Other ruby libs can be loaded at this point,
confirmed by doing “require ‘logger’” in order to dump the contents of
$: above.

I would really like to maintain control of gems on this machine and
keep them in my user directory. Any ideas out there why apache can’t
see this directory?

thanks,
jh


James H.
Web application developer
Vancouver, BC

“Developing a coherent political analysis is in many respects
contingent upon an ability to connect one context to another, a
process not dissimilar to playing the kid’s game of dot-to-dot.”

  • Ward Churchill, from ‘“A Government of Laws”?’

Ok, I was able to get rubygems installed in
/usr/local/lib/ruby/site_ruby/1.8, and rails/CGI still can’t open it.
This is really making my brain itch, if anyone could take a look and
see what stupid thing I’ve missed I would appreciate it.

jh

On 5/30/06, James H. [email protected] wrote:

W, [2006-05-30T11:10:03.040915 #13641] WARN – :
-rw-r–r-- 1 jhughes jhughes 492 May 19 16:06 gemconfigure.rb
/home/jhughes/lib/ruby/site_ruby/1.8/rubygems.rb (LoadError)
thanks,
process not dissimilar to playing the kid’s game of dot-to-dot."

  • Ward Churchill, from ‘“A Government of Laws”?’


James H.
Web application developer
Vancouver, BC

“Developing a coherent political analysis is in many respects
contingent upon an ability to connect one context to another, a
process not dissimilar to playing the kid’s game of dot-to-dot.”

  • Ward Churchill, from ‘“A Government of Laws”?’