Reputation: 95
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
Upvotes: 2
Views: 7213
Reputation: 107728
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.
Upvotes: 2