Topic: Trying to get an RoR project into production for the first time

I've read several guides to this, but they often are either old, or don't fit my situation exactly. Here is the process as I understand it:

1. Install mongrel and mongrel cluster
2. Start mongrel cluster service (to run on one or more ports)
3. Configure apache2.conf for proxy? Or something
4. Bask in Rails goodness

Obviously I'm missing things.

My project is not in SVN, I don't use Capistrano (its just a pretty vanilla Radiant install) and it will be a light traffic site... like 20-50 page views a day at first, so I'm not even sure its necessary to run 3 mongrel services. I just need it in production. I'm using Ubuntu Dapper Drake on a 512 Slicehost slice. And I am running other sites on the server (php sites, also minimal traffic).

Like I said, this is a fist for me. Help!

"Bear 270, young man. Bear two, seven, zero, over." - Musings of a flight simulator guru, me.

Re: Trying to get an RoR project into production for the first time

You'll want to make sure the mongrel gem is installed on your system, if you haven't already. Place your app in the location you desire. Create a new vhost for the app/site. Make sure to set up your proxy balancer cluster and your proxy load balancing for the front-end. Check out Coda Hale's post on this: http://blog.codahale.com/2006/06/19/tim … -and-you/. It's still pretty much relevant today. Mostly look at the mongrel settings and the apache confs.

I'd suggest picking a source code control system of some sorts for the project, it will make your life easier. I prefer git, but svn will work as well.

One thing about mongrels, each mongrel process can take up around 64mb of memory, so you'll have to think about how much memory you have available and what you need to serve this application. I'd suggest starting at 2, you should be fine with that to start and if you get more traffic and usage then you can always add another mongrel process.

Re: Trying to get an RoR project into production for the first time

Check out Passenger (http://www.modrails.com/)... it's much easier than the traditional mongrel route.

Ryan Heneise  |  Art of Mission  |  Now with extra-strong Donor Tools mojo

Re: Trying to get an RoR project into production for the first time

ryenski, are you using passenger in production at all? I was talking with someone in IRC earlier this week and they said it was pretty flaky.

Re: Trying to get an RoR project into production for the first time

No, I use the old fashioned mongrel in production. The only reason is that I need load balancing, and I'm not sure how to set that up for mod_rails.

Leovenous - maybe you're missing some gem requirement? Try starting up the server manually using ./script/server and note any error messages.

Ryan Heneise  |  Art of Mission  |  Now with extra-strong Donor Tools mojo