A crafty, nommy, occassionally geeky blog-thing.

Day 2: Installing ROR on the C-Panel Server

Getting ROR up and running on my cube, served up via webrick is all well and good, but what I really want is ROR live and magic-like on Astoria, our new C-Panel based hosting server.

This means

  1. ruby and its appropriate gems need to be installed on Astoria
  2. FastCGI needs to be installed on Astoria
  3. mod_fcgi needs to be installed and appropriately linked for apache
  4. apache’s config needs to be updated to load mod_fcgi and recognize the fcgi handler
  5. fcgi’s temp directory needs to be made writeable and executable by apache

How to Install and Run Ruby on Rails on Cpanel helpfully runs through all of the details related to the above, in almost foolproof fashion.

Almost foolproof.

Followed the instructions, sans incident.

Created my rails project, and then a symbolic link from project_name/public to /typo under my web root.


typo/public/.htaccess contains the final bits of finishing magic. RewriteBase needs to be set to /typo/ ; a RewriteRule needs to choose whether rails uses dispatch.cgi or dispatch.fcgi.

Obviously, speed is good. We want to dispatch.fcgi. And there are errors.

Things like:

Tue Nov 8 14:02:17 2005] [error] [client] FastCGI: incomplete headers (0 bytes) received from server “/home/ourobus/public_html/typo/dispatch.fcgi”

[Tue Nov 8 14:02:17 2005] [error] [client] FastCGI: comm with (dynamic) server “/home/ourobus/public_html/typo/dispatch.fcgi” aborted: (first read) idle timeout (30 sec)

[Tue Nov 8 14:02:14 2005] [warn] FastCGI: (dynamic) server “/home/ourobus/public_html/typo/dispatch.fcgi” has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

which turned up many unhelpful hits on google, and what do I know about fcgi anyway?

Later, I’ll hit the books. In the mean time, Ruby on Rails works on Astoria, but its slow like molasses. That’ll just be our little secret, kay?