Installing Ruby on Linux

Posted by Samuel Williams Tue, 29 Jul 2008 00:03:00 GMT

Ubuntu is pretty easy - but setting up Ruby is sometimes a bit difficult. There are two important packages that need to be installed to make everything easy:

When you are building native extensions, you need to make sure that you have some tools installed for development. If you are installing a gem and get an errors like:

Building native extensions. this could take a while...
ERROR: While executing em ... (Gem::Installer::ExtensionsBuildError)
    ERROR: Failed to build gem native extension.

ruby extconf.rb install [gem]
extconf.rb:1:in 'require': no such file to load -- mkmf (LoadError)
        from extconf.rb:1

-- OR --

creating Makefile

make
sh: make: not found

Then you need to install the build tools. Errors relating to GCC may also be fixed by the following.

# apt-get install ruby1.8-dev build-essential

This should fix most basic problems with building native ruby gems.

Trackbacks

Use the following link to trackback from your own site:
http://weblog.oriontransfer.org/trackbacks?article_id=installing-ruby-on-linux&day=29&month=07&year=2008

Comments

Leave a comment

Comments