ruby-on-rails – 安装JSON ubuntu错误的rails上的ruby

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 安装JSON ubuntu错误的rails上的ruby前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
嘿,我是rails(以及 linux)的新手,我一直收到这个错误
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$

我无法单独安装gem或使用bundle install.我使用rvm来安装rails.提前致谢.

解决方法

安装ruby1.9.1-dev软件包应该为您解决这个问题
sudo apt-get install ruby1.9.1-dev
原文链接:https://www.f2er.com/ruby/266168.html

猜你在找的Ruby相关文章