ruby-on-rails - Amazon EC2 - Gem::Installer::ExtensionBuildError:错误:无法构建 gem native 扩展。 (JSON)

标签 ruby-on-rails ruby json amazon-ec2 bundle

我刚刚部署了一些新代码( View 中只有一些文本更新),在处理命令 cap deploy 时,我收到以下错误消息:

 ** [out :: IP] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
 ** [out :: IP]
 ** [out :: IP] /usr/local/bin/ruby extconf.rb
 ** [out :: IP] creating Makefile
 ** [out :: IP]
 ** [out :: IP] make "DESTDIR="
 ** [out :: IP]
 ** [out :: IP] Gem files will remain installed in /home/deployer/fileto/shared/bundle/ruby/2.0.0/gems/json-1.8.1 for inspection.
 ** [out :: IP] Results logged to /home/deployer/appname/shared/bundle/ruby/2.0.0/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
 ** [out :: IP] An error occurred while installing json (1.8.1), and Bundler cannot continue.
 ** [out :: IP] Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

它今天才出现,我有大约 2 周没有使用该应用程序进行任何操作。我已经尝试将 json gem 添加到 Gemfile,但它没有帮助 - 仍然是同样的错误。

问题是什么?

谢谢

最佳答案

迟到的答案,但自从我来到谷歌这里,其他人也可以:

您需要重新安装命令行工具。我假设你升级到小牛队了?它有点从 xcode 中删除了 CLI。您现在必须实际访问 Apple 开发人员站点并下载 Mavericks 的 CL 工具: https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-#

安装后,一个包应该可以工作。

关于ruby-on-rails - Amazon EC2 - Gem::Installer::ExtensionBuildError:错误:无法构建 gem native 扩展。 (JSON),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19540902/

相关文章:

javascript - 使用 Angular 映射 JSON 数据模型

css - 引导导航栏没有出现

ruby-on-rails - Omniauth Youtube登录-重定向以在401 nolinkedoutube帐户上创建YouTube channel

ruby - 为什么我使用 "Unrecognized command line argument"得到 "rvm use 1.9.2"?

java - Datastax cassandra QueryBuilder 插入错误(java)

javascript - 使用另一个 json 对象从 json 对象中删除特定内容

mysql - Rails 3.o MYSQL 连接问题

mysql - 错误:ActiveRecord::StatementInvalid:Mysql2::Error:字段 'full_name' 没有默认值

ruby - 如何(终端)从 ruby​​ 脚本进入文件夹

ruby - Mongoid : The Validation "validates_uniqueness_of" is only triggered when the specific field changes