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:

http://brainspl.at/rails_stack.html

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:

http://blog.codahale.com/

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:

http://maniacalrage.net/past/2006/4/12/heres_how_i_create_a/

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

http://www.howtoforge.com/debian_subversion_websvn

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

Advertisements

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 http://ftp.uk.debian.org/debian/ unstable main
    deb-src http://ftp.uk.debian.org/debian/ unstable main

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

  3. Peter Berkenbosch Says:

    Thanks.


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: