# Internal server error while trying to load active\_record

**URL:** <https://www.ruby-forum.com/t/internal-server-error-while-trying-to-load-active-record/166629>\
**Category:** Ruby\
**Created:** [April 28, 2009, 12:34am UTC](https://www.ruby-forum.com/t/internal-server-error-while-trying-to-load-active-record/166629 "2009-04-28T00:34:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [April 28, 2009, 12:34am UTC](https://www.ruby-forum.com/t/internal-server-error-while-trying-to-load-active-record/166629/1 "2009-04-28T00:34:31Z")

</div>

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:in`require’  
[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:in`handler’

Please help.  
Thanks in advance.

Venkat.

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [April 28, 2009, 4:00am UTC](https://www.ruby-forum.com/t/internal-server-error-while-trying-to-load-active-record/166629/2 "2009-04-28T04:00:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [April 28, 2009, 9:51am UTC](https://www.ruby-forum.com/t/internal-server-error-while-trying-to-load-active-record/166629/3 "2009-04-28T09:51:09Z")

</div>

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](http://www.jamesbritt.com) - Playing with Better Toys  
[www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [April 28, 2009, 4:06pm UTC](https://www.ruby-forum.com/t/internal-server-error-while-trying-to-load-active-record/166629/4 "2009-04-28T16:06:00Z")

</div>

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](http://www.jamesbritt.com) - Playing with Better Toys  
> [www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
> [www.rubystuff.com](http://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.
