Setting up RefineryCMS on Ubuntu 10.04 LTS

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 commands below Anything after the $ is a separate command.

1. Install Ruby:

$apt-get install ruby
$sudo apt-get install ruby1.8-dev

2. Install Rubygems:

$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)

$convert --version

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

$refinerycms myproject/

9. Test web server

$rails server

You should get no errors from the server startup and see the welcome page on localhost:3000.

Congratulations! You’re up and running with RefineryCMS on Ubuntu!

This entry was posted in regular and tagged , , , , . Bookmark the permalink.

4 Responses to Setting up RefineryCMS on Ubuntu 10.04 LTS

  1. parndt says:

    You’ll be happy to know that we’ve since removed the requirement for RMagick through improving the dragonfly library so this step is not needed anymore:

    5. Install RMagick gem

    Thanks for the write-up!

  2. ciaranarcher says:

    Hey Phil – thanks for the heads up on that – I’ve added a note to the step.

  3. mae says:

    hi! i was on step 7 and i get this message:

    sudo: gem: command not found

    how will i fix this one? thanks in advance

  4. @mae – do you have Ruby installed? Try `ruby -v` and if you get output you do. The `gem` binary comes with Ruby.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s