gpt4 book ai didi

ruby-on-rails - ruby on rails安装JSON ubuntu错误

转载 作者:行者123 更新时间:2023-12-04 13:41:31 25 4
gpt4 key购买 nike

嘿,我是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。我使用rvm安装滑轨。提前致谢。

最佳答案

安装ruby1.9.1-dev软件包应该为您解决此问题

sudo apt-get install ruby1.9.1-dev

关于ruby-on-rails - ruby on rails安装JSON ubuntu错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13652788/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com