Peter Marklund

Peter Marklund's Home

2008-08-12

Installing Ruby on Rails on Ubuntu 8.04 Hardy Heron

I've compiled a set of detailed instructions on how to install Ruby on Rails on Ubuntu 8.04 Hardy Heron. The instructions are available in GitHub and they show you how to turn a clean Ubuntu 8.04 install into a production ready Ruby on Rails stack including MySQL, Nginx with fair proxy balancer, Monit, and Mongrel Cluster. There are a few additions and improvements I'd like to make:

Please help me point what else is missing or how I can improve.

I'm talking to GleSYS about the possibility of offering my production setup as an installable VPS image.

12 comment(s)

Comments

free games said 2009-03-10 12:53:

Thanks for instructions on how to install Ruby on Rails on Ubuntu 8.04... For me very useful post
--------------------------------------------------------------------------------

stefanioachim@gmail.com said 2008-11-11 07:59:

In nginx/conf/vhosts/my_app.conf the following line : # Directly serve static content location ~ ^/(images|... will cause problems if you have a controller named "images" because it will try to find "/public/images/someaction" instead of the rails route to "/images/someaction" and you'll get a "Not found" page.
--------------------------------------------------------------------------------

samotage said 2008-10-31 04:06:

Hey Peter, Thanks for the nice AND workable answer to getting fair to work inside Nginx. Rock on mate! Sam
--------------------------------------------------------------------------------

kind said 2008-09-19 05:12:

asdsadwD
--------------------------------------------------------------------------------

Kathleen said 2008-09-15 07:56:

Is there a way to get your installation instructions without using Github? Thank you, Kathleen KathysKode@gmail.com
--------------------------------------------------------------------------------

Adam said 2008-08-20 23:20:

You might be interested in Sprinkle, a ruby dsl for system provisioning. It has a great DSL and allows a deployment in a few different ways including with capistrano. http://github.com/crafterm/sprinkle It would allows you to express these instructions in a very readable script, and then do the deployment for you with pre and post hooks for each 'package'. Adam.
--------------------------------------------------------------------------------

Peter Marklund said 2008-08-12 05:59:

David, I am using a GleSYS Gold VPS with 1GB of ram, however, my memory consumption is at 338 MB currently. Peter
--------------------------------------------------------------------------------

David said 2008-08-12 05:54:

How much RAM do you have on your Glesys VPS for this?
--------------------------------------------------------------------------------

David Backeus said 2008-08-12 01:55:

Just noticed that you're using wget without installing the package first. Maybe the default Hardy install on glesys has it preinstalled but it would be a good idea to install some essential packages to start with just in case. I would add curl to that list as well.
--------------------------------------------------------------------------------

David Backeus said 2008-08-12 01:45:

Nice instructions. You could add a comment on the postfix install that it should use the default "web server configuration" when installing. Also if you're doing an image for glesys maybe a version of the stack with a slimmed down mysql or postgres config could be useful for running it on slices with only 256MB ram. Another thing is that de packaged monit is not the latest version and has some drawbacks such as not being able to send mail through smtp and the admin http server not being configurable to be accessed with basic auth as said in the documentation so I usually build that from source. You would have to add a startup script for it manually though.
--------------------------------------------------------------------------------

Peter Marklund said 2008-08-12 01:13:

Robert, I think mod_rails is a great and very promising product, but last time I tried it it had memory leak issues. This may very well be fixed now, but I think the Nginx setup is arguable more proven, i.e. has been around longer. I am quite happy with my Nginx setup so don't think I'll be changing to mod_rails anytime soon. Or are there compelling reasons to switch that I have overlooked?
--------------------------------------------------------------------------------

Robert said 2008-08-12 01:08:

What about Passenger/mod_rails? Since it is now available as an Ubuntu package it is more or less trivial to set up, but I think it should be in there!
--------------------------------------------------------------------------------