Rails / Ubuntu Feisty Quickstart
If you’ve just installed a fresh copy of Ubuntu 7.04 (Feisty Fawn), the following sequence of commands will give you everything you need to run Rails with MySQL or Postgres and Mongrel. This should be run as root (”sudo su -” will get you a root shell).
First, core packages through apt-get:
apt-get install ruby rubygems rake ruby1.8-dev irb rdoc libopenssl-ruby1.8 postgresql-8.2 libpgsql-ruby libmysql-ruby1.8 mysql-server gcc libc6-dev make subversion openssh-server
And your gems:
gem install -y rails mongrel --no-rdoc --nori
If it prompts you for which version of Mongrel (or other gems) to install, the first one on the list (type “1″ and press enter) is almost always right, unless it reads “win32″, in which case pick the first one that says “ruby”. (This silliness is definitely a major weak point of the gem package manager. I’ve created a patch that fixes this issue, which is being studiously ignored by the rubygems maintainers.)
Now, enable mod_rewrite and mod_proxy in your Apache modules (the latter is only necessary if you plan to proxy mongrel, but might as well have it):
a2enmod rewrite
a2enmod proxy
/etc/init.d/apache2 restart
For bonus points, you might want to install a few other useful developer tools:
apt-get install php5 php5-cli php5-pgsql php5-mysql vim-gtk vim-ruby
May 15th, 2007 at 12:05 pm
just fyi, Ubuntu has the utility a2enmod for automagically creating those symlinks for you.
a2enmod rewrite
a2enmod proxy
also note a2dismod, a2ensite, a2dissite
July 2nd, 2007 at 9:44 pm
These guys just released a new binary distro to get Rails running: http://linrails.thembid.com/. Have you given that a try?