Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ruby on rails installing JSON ubuntu error

Hey I am new to rails (as well as linux) and I keep getting this error:

Installing json (1.7.5) with native extensions 
Gem::Installer::ExtensionBuildError: 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 /home/jack/.bundler/tmp/10426/gems/json-1.7.5 for inspection.
Results logged to /home/jack/.bundler/tmp/10426/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.5'` succeeds before bundling.
jack@jack-ThinkCentre:~/rails_projects/sample_app$ 

I cant install the gem individually or with bundle install. I used rvm to install rails. thanks in advance.

like image 865
Jakxna360 Avatar asked Nov 30 '12 20:11

Jakxna360


1 Answers

Installing the ruby1.9.1-dev package should fix this for you

sudo apt-get install ruby1.9.1-dev
like image 162
Gowri Naidu R Avatar answered Nov 13 '22 00:11

Gowri Naidu R