I’ve had an interest in Ruby on Rails for a while, and I have toyed around with Ubuntu before. So I decided to combine the two and get my *nix on by setting up a Rails-based CMS for a personal project on Unbuntu – the ‘friendly’ Lunix distribution.
But first I needed a Rails CMS. After a bit of searching around, the best candidate emerged as RefineryCMS which is really just getting off the ground.
However, I liked what I saw, so I decided to follow the prerequisites and I ended up in a world of pain for about three whole evenings.
The main issues revolved around the image manipulation modules required, especially ImageMagick and RMagick and different versions thereof, compounded by a (current) slightly incomplete setup guide from RefineryCMS themselves. This was a lethal cocktail for a novice in both Rails and Lunix like me.
Anyway, whilst getting help from the guys in the RefineryCMS Google group I promised I’d document how I got it working on a clean Ubuntu 10.04 LTS.
So without further delay:
- You have successfully installed Ubuntu on Oracle Virtual Box (beyond the scope of this article!)
- You can open a terminal window (shell) and enter the
commandsbelow Anything after the
$is a separate command.
1. Install Ruby:
$apt-get install ruby $sudo apt-get install ruby1.8-dev
2. Install Rubygems:
$wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz $tar xvzf rubygems-1.3.7.tgz $cd rubygems-1.3.7 $sudo ruby setup.rb $sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1
More info here.
3. Install bundler gem:
$sudo gem install bundler
4. Confirm ImageMagick 6.5.7-8 is installed (should be by default)
5. Install RMagick gem (note this is no longer required in later versions – see comments):
$sudo apt-get install libmagickwand-dev $sudo gem install rmagick
6. Install SQLite and OpenSSL
$sudo apt-get install libsqlite3-dev sqlite3 $sudo apt-get install libopenssl-ruby1.8
7. Next try RefineryCMS install:
$sudo gem install refinerycms
This might take a good few minutes as it installs all it’s gem dependencies.
8. Setup a project
9. Test web server
You should get no errors from the server startup and see the welcome page on
Congratulations! You’re up and running with RefineryCMS on Ubuntu!