Skip to content

Error while installing rails

October 19, 2012

I was getting my hands dirty with ruby on rails as part of Software as a Service course by Berkeley university. After installing RubyGems next I needed to install rails framework, but I got following error

I am working on ubuntu 12.10 64 bit

sudo gem install rails
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
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: cannot load such file — mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
from extconf.rb:1:in `<main>’

Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.7.5 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.7.5/ext/json/ext/generator/gem_make.out

It was referring some package from the ruby1.9.1-dev So I went ahead and installed ruby1.9.1-dev with following command

sudo apt-get install ruby1.9.1-dev

that’s it and sudo gem install rails worked like charm

From → Uncategorized

Leave a Comment

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: