首页 文章

Ruby没有安装json -v 1.8.1作为bundle的一部分,ERROR:无法构建gem原生扩展

提问于
浏览
0

我've tried installing using as part of the bundle and using sudo, but I get the same error message every time. I'目前正在 Ruby 2.0.0 and Rails 4.1.8 . 我不确定发生了什么 . 以下确切的错误消息:

从https://rubygems.org / .........获取gem元数据 . 解析依赖关系......使用rake 10.4.2使用i18n 0.6.11 Gem :: Ext :: BuildError:错误:失败构建gem原生扩展 . /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141218-80226-brqexc.rb extconf.rb mkmf.rb在/ System / Library中找不到ruby的头文件/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h extconf失败,退出代码1 Gem文件将保留在/Library/Ruby/Gems/2.0.0/gems/json-1.8中.1进行检查 . 结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/json-1.8.1/gem_make.out安装json(1.8.1)时出错,而Bundler不能继续 . 在捆绑之前确保gem install json -v'1.8.1'成功 .

任何建议表示赞赏

1 回答

  • 0

    我在Ubuntu上遇到了类似的错误,我需要做的就是:

    sudo apt-get install ruby-dev
    

    对于Mac,以下要点值得一看:Setup mac for ruby dev

相关问题