Forum: Ruby Internal server error while trying to load active_record

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.
Venkat A. (Guest)
on 2009-04-28 02:34
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.
Venkat A. (Guest)
on 2009-04-28 06:00
Come on guys, please don't break my heart. Please throw me some ideas.
Please...
James B. (Guest)
on 2009-04-28 11:51
(Received via mailing list)
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
Venkat A. (Guest)
on 2009-04-28 18:06
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.
This topic is locked and can not be replied to.