LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 03-07-2008, 04:55 PM   #1
I_AM
Member
 
Registered: Mar 2005
Posts: 103

Rep: Reputation: 15
Ruby / Fastcgi Problem


I tried to install my rails application. However it does not work
properly (the rails welcome screen's "About your application
environment" link gives a "Application error Rails application failed
to start properly" message), and the error log shows plenty of FastCGI
warnings and fcg incomplete header errors:


[Thu Mar 6 07:44:20 2008] [warn] FastCGI: (dynamic) server
"/home/username/public_html/jaspis/public/dispatch.fcgi" has failed
to remain running for 30 seconds given 3 attempts, its restart interval has
been backed off to 600 seconds
[Thu Mar 6 07:39:47 2008] [error] [client 91.120.172.159] FastCGI: incomplete
headers (0 bytes) received from server
"/home/username/public_html/jaspis/public/dispatch.fcgi"
[Thu Mar 6 07:39:47 2008] [warn] FastCGI: (dynamic) server
"/home/username/public_html/jaspis/public/dispatch.fcgi" has failed
to remain running for 30 seconds given 3 attempts, its restart interval has
been backed off to 600 seconds
[Thu Mar 6 07:39:47 2008] [error] [client 91.120.172.159] FastCGI: comm with
(dynamic) server
"/home/username/public_html/jaspis/public/dispatch.fcgi" aborted:
(first read) idle timeout (30 sec)



Code:
/usr/local/bin/ruby -v
ruby 1.8.5 (2006-08-25) [i686-linux]

whereis ruby          
ruby: /usr/bin/ruby /usr/lib/ruby /usr/local/bin/ruby /usr/local/lib/ruby /usr/local/ruby /usr/man/man1/ruby.1

./dispatch.fcgi
./dispatch.fcgi:21:in `require': no such file to load -- ./../config/environment (LoadError)
        from ./dispatch.fcgi:21
Code:
root@server [/home/user/public_html/dir]# ls -lh
total 68K
drwxr-xr-x  13 user user 4.0K Mar  5 04:29 ./
drwxr-x---   7 user nobody   4.0K Mar  6 10:49 ../
drwxr-xr-x   6 user user 4.0K Mar  4 08:28 app/
drwxr-xr-x   4 user user 4.0K Mar  6 10:33 config/
drwxr-xr-x   3 user user 4.0K Mar  4 08:56 db/
drwxr-xr-x   2 user user 4.0K Mar  4 08:28 doc/
drwxr-xr-x   3 user user 4.0K Mar  4 08:56 lib/
drwxr-xr-x   2 user user 4.0K Mar  4 08:28 log/
drwxr-xr-x   5 user user 4.0K Mar  6 10:43 public/
-rw-r--r--   1 user user  307 Mar  4 08:28 Rakefile
-rw-r--r--   1 user user 8.7K Mar  4 08:28 README
drwxr-xr-x   4 user user 4.0K Mar  4 08:28 script/
drwxr-xr-x   7 user user 4.0K Mar  4 08:28 test/
drwxrwxrwx   6 user user 4.0K Mar  4 08:28 tmp/
drwxr-xr-x   3 user user 4.0K Mar  4 08:28 vendor/
Code:
root@server [/home/user/public_html/dir/config]# ls -lh
total 32K
drwxr-xr-x   4 user user 4.0K Mar  6 10:33 ./
drwxr-xr-x  13 user user 4.0K Mar  5 04:29 ../
-rw-r--r--   1 user user 2.7K Mar  4 08:28 boot.rb
-rw-r--r--   1 user user  638 Mar  6 10:33 database.yml
-rw-r--r--   1 user user 2.8K Mar  6 04:31 environment.rb
drwxr-xr-x   2 user user 4.0K Mar  4 08:47 environments/
drwxr-xr-x   2 user user 4.0K Mar  4 08:28 initializers/
-rw-r--r--   1 user user 1.6K Mar  4 08:46 routes.rb


Files in the config directory have all -rw-r--r-- (644), subdirectories have
755, the files in the environments subdirectory all have 644 permissions.

Owner is username, group is username in all cases.

I have now changed the shebang line of dispatch.fcgi from:
#!/usr/bin/ruby to
#!/usr/local/bin/ruby
I also did this with the dispatch.rb and the dispatch.cgi

The issue continues and I'm finding it rather difficult to trace the immediate
cause of this fastcgi module issue. Your assistance is appreciated.


Specs:
Centos 5 / Cpanel 11 / PHP 5 / MYSQL 5

Last edited by I_AM; 03-07-2008 at 04:57 PM.
 
Old 03-09-2008, 07:15 AM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
FastCGI isn't recommended for Rails applications anymore, because there are no Open Source implementations of FastCGI that are consistently stable. I hit nasty issues with FastCGI very quickly myself, with both Rails and Django, and finally went with Django and mod_python.

I've just got the PDF of Deploying Rails Applications. It looks like the best guide that I've ever seen on deploying Web apps, and I'd recommend it to any one thinking about putting Rails into production use. The book is marked "beta" on the site, but the content is complete.
 
  


Reply

Tags
fastcgi, rails


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FastCGI installation I_AM Linux - General 1 05-10-2009 05:30 AM
Ruby SDL/ Ruby OpenGL tutorials/reference? LinuxNoob75 Programming 0 12-30-2007 12:47 PM
PHP v Ruby/Ruby on Rails Neko_D Linux - General 4 02-08-2007 11:56 PM
[Ruby] Tar'ing or Zip'ing with ruby script lmcilwain Programming 2 01-19-2007 06:56 PM
Ubuntu - Problem with WMII RUBY Wind_Sp00n Ubuntu 0 10-10-2006 08:44 PM


All times are GMT -5. The time now is 05:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration