Forum: Ruby on Rails uninitialized constant RailsFCGIHandler

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.
Simone F. (Guest)
on 2006-02-19 18:57
Hello, I'm trying to switch to FastCGI.

With CGI everything works, but after have done all the steps of the wiki
here
(http://wiki.rubyonrails.org/rails/pages/RailsOnUbu...)

My application started to give me "Error 500"

Looking at the Apache logs I can see :

[notice] mod_fcgid: server /rails/public/dispatch.fcgi(6127) started

/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing': uninitialized constant RailsFCGIHandler (NameError)
 from /rails/public/dispatch.fcgi:25

[notice] mod_fcgid: process /rails/public/dispatch.fcgi(6127)
exit(communication error), terminated by calling exit(), return code: 1

The environment is :
Ubuntu - Apache 2 - Gem 0.8.11 - Ruby 1.8.3

Any ideas ?

Simone
David S. (Guest)
on 2006-02-19 20:18
(Received via mailing list)
On 19 Feb 2006, at 16:57, Simone F. wrote:
>
> The environment is :
> Ubuntu - Apache 2 - Gem 0.8.11 - Ruby 1.8.3

Ubuntu likes you to call the "fastcgi-script"  "fcgid-script .fcgi".

so go to the public/.htaccess file and change the line:
=> AddHandler fastcgi-script .fcgi

at the top of the file to:
=> AddHandler fcgid-script .fcgi

thats what I have to do on my Ubuntu breezy dev. server.


David S.
w: http://davidsmalley.com/blog
Simone F. (Guest)
on 2006-02-20 10:36
David S. wrote:
> Ubuntu likes you to call the "fastcgi-script"  "fcgid-script .fcgi".
>
> so go to the public/.htaccess file and change the line:
> => AddHandler fastcgi-script .fcgi
>
> at the top of the file to:
> => AddHandler fcgid-script .fcgi

It's already like this :-(

Any other advice ?

Simone
David S. (Guest)
on 2006-02-20 11:17
(Received via mailing list)
On 20 Feb 2006, at 08:36, Simone F. wrote:

> David S. wrote:
>> Ubuntu likes you to call the "fastcgi-script"  "fcgid-script .fcgi".
>>
>> so go to the public/.htaccess file and change the line:
>> => AddHandler fastcgi-script .fcgi
>>
>> at the top of the file to:
>> => AddHandler fcgid-script .fcgi
>
> It's already like this :-(

Have you done "gem install fcgi"?



David S.
w: http://davidsmalley.com/blog
Simone F. (Guest)
on 2006-02-20 21:54
David S. wrote:
> On 20 Feb 2006, at 08:36, Simone F. wrote:
> Have you done "gem install fcgi"?

Yes, I did this as well ... :-(

Simone
Greg F. (Guest)
on 2006-02-20 23:46
(Received via mailing list)
On 2/20/06, Simone F. <removed_email_address@domain.invalid> wrote:
> David S. wrote:
> > On 20 Feb 2006, at 08:36, Simone F. wrote:
> > Have you done "gem install fcgi"?
>
> Yes, I did this as well ... :-(
>
> Simone

If you run "ruby dispatch.fcgi" directly from the command line you
should get "Status: 500 Internal Server Error." due to the lack of a
webserver driving dispatch.fcgi.

If instead it blows up, you have a basic fcgi setup issue.

If you are getting the above, then I think you are having a website
configuration issue.

Greg
--
Greg F.
The Norcross Group
Forensics for the 21st Century
Simone F. (Guest)
on 2006-02-21 10:27
Greg F. wrote:
> If you run "ruby dispatch.fcgi" directly from the command line you
> should get "Status: 500 Internal Server Error." due to the lack of a
> webserver driving dispatch.fcgi.
>
> If instead it blows up, you have a basic fcgi setup issue.
>
> If you are getting the above, then I think you are having a website
> configuration issue.

Hej, I create a new rails app on my system and that error disappeared
... but a new one came out :-(

I posted it here : http://www.ruby-forum.com/topic/55353#37588

Simone
David S. (Guest)
on 2006-02-21 12:45
(Received via mailing list)
On 21 Feb 2006, at 08:27, Simone F. wrote:

> Greg F. wrote:
>> If you run "ruby dispatch.fcgi" directly from the command line you
>> should get "Status: 500 Internal Server Error." due to the lack of a
>> webserver driving dispatch.fcgi.
>>

This is what I do to debug a new application when I set it up and
something goes wrong. Normally a bit more verbose than looking in
apache logs

>
> Hej, I create a new rails app on my system and that error disappeared
> ... but a new one came out :-(
>

I know that on my mac some modules put themselves into

/usr/lib/ruby/site_ruby/1.8/...

but the main ruby install is in

/usr/lib/ruby/1.8

As its just a few extra modules in /site_ruby i have symlinked them
into the /1.8 folder.

Have a look in /usr/lib/ruby (or /usr/local/lib/ruby ) and see what
your setup is. Perhaps your app is looking in site_ruby but your ruby
install is in 1.8?

David

David S.
w: http://davidsmalley.com/blog
Thomas W. (Guest)
on 2007-11-25 05:34
> If you run "ruby dispatch.fcgi" directly from the command line you
> should get "Status: 500 Internal Server Error." due to the lack of a
> webserver driving dispatch.fcgi.
>
> If instead it blows up, you have a basic fcgi setup issue.
>
> If you are getting the above, then I think you are having a website
> configuration issue.

And what would that basic fcgi setup issue be?

When I run dispatch.fcgi or try to run the script from my browser this
appears in my apache error logs:

[notice] mod_fcgid: process
/usr/local/www/vhosts/shallotsanctuary.com/httpdocs/dispatch.fcgi(79949)
exit(communication error), terminated by calling exit(), return code:
120

And if I run from the commandline, I get:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in
`load_missing_constant': uninitialized constant RailsFCGIHandler
(NameError)

Of course, if I use ruby -d, it certainly does "blow up".
This topic is locked and can not be replied to.