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:
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!
November 20, 2006 at 9:53 pm
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?
November 21, 2006 at 4:27 pm
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.
November 21, 2006 at 8:31 pm
Thanks.