Head London

Getting on Rails Quickly for Debian-based systems

Monday 3rd November 2008 at 12:47 pm

Just to speed things up for anybody who needs it, here are the commands we use to get Rails sites working on a fresh Debian-based system.

[cc lang="bash"]sudo apt-get install ruby rdoc1.8 ri1.8 irb1.8 irb ruby1.8-dev build-essential mysql-server libmysql-ruby libmysqlclient15off libmysqlclient15-dev mysql-admin imagemagick librmagick-ruby libmagick9-dev libopenssl-ruby subversion git-core[/cc]

Next, go to http://rubyforge.org/frs/?group_id=126 and download the latest rubygems package (grab the .tar.gz file).

Extract it, and run

[cc lang="bash"]sudo ruby setup.rb[/cc]

When that finishes, you should be able to type

[cc lang="bash"]gem -v[/cc]

And get a version number (like 1.3.1 at present).  If this doesn’t work, it may be the case that it installed as command “gem1.8″ (rather than “gem”).  So we can fix this pretty easily:

[code]sudo ln -s /usr/bin/gem1.8 /usr/bin/gem[/code]

Lastly you can install all the commonly used gems we use here:

[code]gem sources -a http://gems.github.com
sudo gem install mongrel ruby-debug mysql mislav-will_paginate ferret
acts_as_ferret rmagick fastercsv rails capistrano rake[/code]

1 comment so far.

  1. Stu says:

    On the apt installs I got an error installing libmagick9-dev, which meant you can’t install rmagick. Found that if you install libmagick*-dev and libmagickwand-dev then you can get rmagick to install.

Leave a comment