Ugh, I’m about to give up on using Rails other than at work. As much as I like Ruby on Rails, it seems impossible to do what I want to do with it on my hosting provider. And no, I’m not switching hosts. I like it here. I’ll just go back to doing something instead of Rails.
Here’s the problem: does anyone know how the hell to tell Rails to run as a FastCGI daemon? If I were still using Django, all I’d have to do is:
./manage.py runfcgi method=threaded host=127.0.0.1 port=3120
However, I can find no similar capability in Rails whatsoever, and running Mongrel or WEBrick on that port obviously does no good because they’re not FCGI daemons, they’re webservers.
Details on the setup: Basically, in the public HTML directory of the site I want to be FCGI’d, I have an htaccess file that contains:
RewriteEngine on
RewriteRule ^(.*)$ http://localhost:8080/ulrichp/$1 [P]
Near as I can tell, FastCGI is running as a daemon on port 8080, and is looking for my FastCGI process to be running on port 3120. Which is why my above code for Django works just fine: it starts serving my app itself on port 3120, and responds directly to requests passed to it via FCGI. However, I can’t find any way to do the same thing using Rails.