PDA

View Full Version : Very BIG Ruby problem


pamela25
March 7th, 2008, 09:05 PM
Hello guys,

Im looking like crazy for help on this, i hope you guys can give me a hand on this.
I have setup ruby on a cpanel server that runs apache2.2+php5+fcgi.
Everytime i want to run dispatch.fcgi from a browser i got the following error:

[Fri Mar 07 17:56:04 2008] [warn] FastCGI: (dynamic) server "/home/amindsde/public_html/testapp2/public/dispatch.fcgi" (uid 32003, gid 32005) restarted (pid 30491)
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- fcgi (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
from dispatch.fcgi:22
[Fri Mar 07 17:56:05 2008] [warn] FastCGI: (dynamic) server "/home/amindsde/public_html/testapp2/public/dispatch.fcgi" (pid 30491) terminated by calling exit with status '1'
[Fri Mar 07 17:56:08 2008] [error] [client 190.135.146.135] FastCGI: comm with (dynamic) server "/home/amindsde/public_html/testapp2/public/dispatch.fcgi" aborted: (first read) idle timeout (240 sec)
[Fri Mar 07 17:56:08 2008] [error] [client 190.135.146.135] FastCGI: incomplete headers (0 bytes) received from server "/home/amindsde/public_html/testapp2/public/dispatch.fcgi"

I've already issued 'gem install fcgi' but it does not make any change.

This is my dispatch.fcgi :

#!/usr/bin/ruby
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
require 'fcgi'
require 'rubygems'
gem 'fcgi'

RailsFCGIHandler.process!

I've also tried removing the last 3 lines but im still getting the same.
If i do 'ruby dispatch.fcgi' over command line it does not show nothing.

Thanks in advance for reading my post, i would really appreciate if someone can help me with this.
Please let me know if you want me to paste any other file, i will do it right away.


Thank you very much guys.


Warm regards,

Pam.

rob
March 8th, 2008, 06:36 PM
gem install fcgi

will only work if you have installed the FastCGI development libraries.

pamela25
March 8th, 2008, 09:02 PM
rob, thanks for your reply.
If you check my post you would see i've already issued that command.
Why do you think is not working? I already did 'gem install fcgi'.
I've also had a problem with mysql, issued a 'gem install mysql' and the problem dissapeared, but it seems its not working for fcgi.
Please advice.

Thanks in advance.

rob
March 9th, 2008, 05:30 PM
I said in my previous post that you must have the FastCGI development libraries installed before you run gem install fcgi. I suspect that you don't, and this is what is causing the problem.