我刚刚部署了一些新代码( 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/