本文介绍了ruby on rails安装JSON ubuntu错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
安装json(1.7) .5)与本机扩展
Gem :: Installer :: ExtensionBuildError:错误:无法构建gem本机扩展。
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in`require':can not load such file - mkmf(LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in`require'
from extconf.rb:1:in<<主要>'
Gem文件将保留安装在/home/jack/.bundler/tmp/10426/gems/json-1.7.5中进行检查。
记录到/home/jack/.bundler/tmp/10426/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
的结果安装json时发生错误(1.7 .5)和Bundler无法继续。
确保`gem install json -v'1.7.5'`捆绑成功。
jack @ jack-ThinkCentre:〜/ rails_projects / sample_app
我无法安装宝石单独或捆绑安装。我用rvm来安装rails。在安装ruby1.9.1-dev软件包时应该为你解决这个问题。 $ b
sudo apt-get install ruby1.9.1-dev
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.
解决方案
Installing the ruby1.9.1-dev package should fix this for you
sudo apt-get install ruby1.9.1-dev
这篇关于ruby on rails安装JSON ubuntu错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!