Internal server error while trying to load active_record

Hi

The following is my configuration -

OS - OS X 10.4.11
Ruby version - 1.8.6
gem version - 1.3.1
Active record version - 2.3.2 (the old versions still exist on the
machine if that matter)
mod_ruby version - 1.3

I have test script that has only three entries thats throwing the
internal server error, here is the script -

#!/usr/local/bin/ruby

require ‘rubygems’
require ‘active_record’

Adn the error message from the apache logs -

[Mon Apr 27 18:33:12 2009] [error] mod_ruby: error in ruby
[Mon Apr 27 18:33:12 2009] [error] mod_ruby:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require': no such file to load -- active_record (LoadError) [Mon Apr 27 18:33:12 2009] [error] mod_ruby: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
[Mon Apr 27 18:33:12 2009] [error] mod_ruby: from
/Library/WebServer/Documents/cgi-ruby/test.rb:4
[Mon Apr 27 18:33:12 2009] [error] mod_ruby: from
/usr/local/lib/ruby/1.8/apache/ruby-run.rb:53:in load' [Mon Apr 27 18:33:12 2009] [error] mod_ruby: from /usr/local/lib/ruby/1.8/apache/ruby-run.rb:53:inhandler’

Please help.
Thanks in advance.

Venkat.

Come on guys, please don’t break my heart. Please throw me some ideas.
Please…

Venkat A. wrote:

Come on guys, please don’t break my heart. Please throw me some ideas.
Please…

Where are your gems installed, and where is apache looking to find
gems?

Are you sure the AR gem is where apache is looking?


James B.

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

James B. wrote:

Venkat A. wrote:

Come on guys, please don’t break my heart. Please throw me some ideas.
Please…

Where are your gems installed, and where is apache looking to find
gems?

Are you sure the AR gem is where apache is looking?


James B.

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

Thanks for reply James.

I think I found the issues. One of the dependencies for the
active_record, which is activesupport ended up in
~/.gem/ruby/1.8/gems/activesupport-2.3.2 directory. Looks like the
apache could not get to it, while the same script works fine from the
command line.

A new ‘gem install activesupport’ resolved that issue.

However before I figured this I moved on to ‘fastcgi’, and ditched
‘mod_ruby’. I may test it again with ‘mod_ruby’ just make sure that is
the case.