Forum: Ruby on Rails Apache can't load/require rubygems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E74a19a983b0da1c671de90b341e7c06?d=identicon&s=25 James Hughes (Guest)
on 2006-05-30 20:26
(Received via mailing list)
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 Hughes
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"?'
E74a19a983b0da1c671de90b341e7c06?d=identicon&s=25 James Hughes (Guest)
on 2006-05-30 21:19
(Received via mailing list)
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 Hughes <hughes.james@gmail.com> 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 Hughes
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"?'
This topic is locked and can not be replied to.