2

I'm trying to install rails on ubuntu 12.04 but I'm having some issues

I tried

sudo gem install rails --pre

and got

Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:13:in `require': cannot load such file -- mkmf (LoadError)
from extconf.rb:13:in `<main>'


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/atomic-1.1.10 for   inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/atomic-1.1.10/ext/gem_make.out
adeyo92
  • 95
  • 3
  • 7
  • possible duplicate of [\`require': no such file to load -- mkmf (LoadError)](http://stackoverflow.com/questions/7645918/require-no-such-file-to-load-mkmf-loaderror) – platforms Jul 24 '13 at 03:29
  • possible duplicate of [Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)](http://stackoverflow.com/questions/13767725/unable-to-install-gem-failed-to-build-gem-native-extension-cannot-load-such) – Ciro Santilli OurBigBook.com Mar 07 '14 at 19:56

1 Answers1

2

This is because when you installed Ruby you did not install the build tools as well.

I wrote a blog post about installing Ruby + Rails on Ubuntu that has helped out a lot of people, and will probably help you too.

Ryan Bigg
  • 106,965
  • 23
  • 235
  • 261
  • Please include details here rather than just the link. – Alexander Trauzzi Mar 28 '14 at 14:21
  • 1
    While this answer is almost a year old it would be helpful if you posted the essential parts of the answer here, on this site, or your post risks being deleted [See the FAQ where it mentions answers that are 'barely more than a link'.](http://stackoverflow.com/faq#deletion) You may still include the link if you wish, but only as a 'reference'. The answer should stand on its own without needing the link. – Taryn Mar 28 '14 at 15:33
  • 1
    This link doesn't answer the question. – Zuhaib Ali May 11 '14 at 05:51