【问题标题】:bundle cannot build gem native extension while gem can - jsonbundle 无法构建 gem 原生扩展,而 gem 可以 - json
【发布时间】:2011-12-19 12:50:24
【问题描述】:

我知道,还有一个类似的问题,但到目前为止没有任何帮助。

当我在生产服务器上运行 bundle install 时,我收到以下错误:

...
Installing json (1.6.3) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb 

Gem files will remain installed in /home/onblimp/onblimp/releases/20111213131738/RAILS_ENV=production/ruby/1.9.1/gems/json-1.6.3 for inspection.
Results logged to /home/onblimp/onblimp/releases/20111213131738/RAILS_ENV=production/ruby/1.9.1/gems/json-1.6.3/ext/json/ext/parser/gem_make.out
An error occured while installing json (1.6.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.3'` succeeds before bundling.

当我运行gem install json -v '1.6.3' 时,它安装时没有错误。我以 root 身份运行这两个命令。在开发中它运行良好。几天前它也运行良好。

感谢任何帮助。

【问题讨论】:

  • 否(不在生产​​服务器上)。

标签: ruby-on-rails json bundle bundler


【解决方案1】:

我已经设法通过简单地重新启动服务器来解决这个问题。知道原因会很好,但我想这问得太多了。

【讨论】:

    【解决方案2】:

    嘿,我遇到了同样的错误。我安装了 xcode 并重新启动我的 mac。然后我在 rails 中创建了新项目并进入了这个

    **Errno::EPERM: Operation not permitted
    An error occured while installing json (1.6.3), and Bundler cannot continue.
    Make sure that `gem install json -v '1.6.3'` succeeds before bundling**
    

    我刚刚做了 sudo gem install json -v '1.6.3' 它在我的情况下运行良好。

    【讨论】:

      猜你喜欢
      • 2013-07-20
      • 2015-07-20
      • 2015-06-18
      • 2013-03-09
      • 2011-05-27
      • 2010-09-07
      • 2013-06-27
      • 2016-03-08
      相关资源
      最近更新 更多