Rails Hosting For Dummies (Chapter I) 4
So, if you’re experienced with ASP.NET hosting, you’re probably used to just signing up for an account, uploading your app, and off you go! Most ASP.NET hosts (like my favorite, WebHost4Life), require little to no setup to get up and running. Alas, as great and productive a framework as Rails is, Rails hosting isn’t nearly as easy and straightforward. Especially for a guy like me, who had just about zero knowledge of nix shared hosting before starting with Rails. Here’s a quick rundown and some links that helped me get started… hopefully this will save you some time (and pain).
Hosting companies. There are more than a few reputable companies doing Rails hosting nowadays. The ones I’ve had experience with are TextDrive and Dreamhost. I’ve also heard good things about Planet Argon. In my opinion, TextDrive is fast, reliable, and the service is top-notch – but expects you to know (or learn) what you’re doing. Dreamhost has a bit more of a “for dummies” quality to it, and is less expensive, but still fairly reliable. If you’re just starting out, and want a less expensive “sandbox” of sorts, go with Dreamhost. If you’re ready to deploy a relatively robust production-quality application, then TextDrive’s the way to go. Just in my experience, of course.
Web servers. To serve up your production Rails application, you’ll need to choose between the Apache/FastCGI and Lighttpd web servers. Apache has been around forever, and is very stable and reliable. This also means there hasn’t been too much recent innovation. Lighttpd is very scalable, and lightning-fast. There’s lots of information on the different environments in the Rails book, so I won’t go into too much detail here. Either way, you’re going to endure some pain if you’re used to the GUI-based configuration of IIS. Personally, I’m using Lighttpd on TextDrive for Coastr, mainly because my app wasn’t doing too well on Apache, and the admins recommended I give it a try. It definitely takes some tweaking to get going, but once you do, your site will absolutely scream. If you’re on TextDrive, look here first, then here for everything you need to get started.
Random (and possibly even helpful) tips
- I found that under lighttpd, my app would occasionally experience 30-second or more delays when performing simple actions. I added the
server.max-keep-alive-requests = 0line to my lighttpd.conf… and voila… instantly better. - When starting out, you might wonder why that change you just uploaded doesn’t show up. When running in production mode, don’t forget that your pages are cached. You need to restart your web server in order for the changes to take effect. No, that doesn’t mean you have to fly to California and press the power button on your box. On TextDrive, you can “apply changes” if you’re using Apache/FastCGI, or kill and restart lighttpd. On Dreamhost, a simple
killall -9 dispatch.fcgiwill do. - Seems obvious, but if you are running on Apache, don’t forget to change your .htaccess file (in your public directory) to use FastCGI instead of the default CGI… i.e.
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]You can feel free to delete all the other dispatch. files from your public directory once you’re done.
More to come… as I’m discovering this new world of Rails shared hosting, I’ll share with you here.



Very interesting post, guys! :-)
Well at last catched the problem...
I’ve been using credit cards for quite a while already and I’ve built a good credit history. But I feel that I do not enjoy all the opportunities of my credit card, using it for offline purchases only. There are lots of web sites where you can buy things with credit cards and it saves your time and effort. But, is it secure to buy online? If yes, I’m going to apply for card at
balance transfer cards online
Transcendental subjectivity (in the broadest Cartesian sense) does not yet produce for us any abiding being.