Debian + Ruby on Rails + Mongrel setup

November 17, 2006

I just got a clean VPS with debian installed and am setting it up to run my Ruby on Rails application. The setup is bare bones and only includes these base applications: Ruby, Rails, Mysql 5, Apache 2.2.3 (with mod_proxy_balancer) and Mongrel.

1. Base Debian setup
I just followed these excellent directions:

I replaced some outdate packages for some of the newer ones. Mysql 5 and dependiences being the biggest ones.

2. Mongrel setup
I just followed these excellent directions:

3. Apache 2.2.3 setup

As of the creation of this article Debian has Apache 2.2.3 built in the unstable tree. Grab this! It will make upgrading and bug fixes much easier.

To enable all the modules we need for mongrel – rails setup do this from /etc/apache2/mods-enabled:

# ln -s ../mods-available/rewrite.load .
# ln -s ../mods-available/ssl.load .
# ln -s ../mods-available/deflate.load .
# ln -s ../mods-available/headers.load .
# ln -s ../mods-available/proxy.load .
# ln -s ../mods-available/proxy_http.load .
# ln -s ../mods-available/proxy_balancer.load .

Now restart Apache and it should be all ready to go.

4. SVN setup

I folowed this article to set up the Ruby on Rails project in SVN:

and this one to set up WebDAV and group access to the SVN:

That should be it for the inital setup. Go create and launch your application!


3 Responses to “Debian + Ruby on Rails + Mongrel setup”

  1. Peter Berkenbosch Says:

    Could you explain how I could use and install apache2.2.3 from the unstable tree? I suppose that I have to uncomment some lines in sources.list but what comment do I have to use to install the unstable version?

  2. whitt Says:

    uncomment everything in source.list and add the following lines:

    deb unstable main
    deb-src unstable main

    Make sure these are the only lines in source.list and you should see apache 2.2.3.

  3. Peter Berkenbosch Says:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: