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.
- ruby and its appropriate gems need to be installed on Astoria
- FastCGI needs to be installed on Astoria
- mod_fcgi needs to be installed and appropriately linked for apache
- apache’s config needs to be updated to load mod_fcgi and recognize the fcgi handler
- 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.
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.
Tue Nov 8 14:02:17 2005] [error] [client 220.127.116.11] FastCGI: incomplete headers (0 bytes) received from server “/home/ourobus/public_html/typo/dispatch.fcgi”
[Tue Nov 8 14:02:17 2005] [error] [client 18.104.22.168] 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?