Child pages
  • HOWTO Build a Ruby environment on Ubuntu
Skip to end of metadata
Go to start of metadata

You can do all this with the package managers, but be aware the ruby packages on Ubuntu are spread all over the place. Also, you'll may need the build-essentials package for a couple of the gems.

Do the following:

Some or all of which might have been installed at some point previously in the chain, but this should get it all and give you a working rubygems install.

Then you want to run (as root):

Gem may fail initially - if so this is due to a bug in the gem command and requires you to edit the gem script (found with the command which gem on the command line) by adding to the require statements:

And install some useful gems, if you're wanting to play with rails:


  1. Tom, note that your space is not visible to anon users so this page breaks when a user is not logged in (unlike the rest of the space).

    I should also add that I used Synaptic and it seemed to do everything I needed in a single step - I have a working ruby and rubygems system.

    1. Which packages did you install?

      1. if you're lucky I'll remember to check when I'm at home sometime (smile)

      2. ruby, ruby1-8, libruby (can't remember if I did these in separate steps or if they all came together)

        it doesn't give me quite all the stuff you list above, but it does give me a working Ruby and Gems installation.

        1. Interesting. I had trouble without ruby-dev, which appears to contain various development libraries for ruby.