我正在尝试将我的 rails 应用程序推送到 heroku,但安装 xcodeproj gem 时出现问题。运行 git push heroku master 后,依赖项会被安装,直到它到达这里:
Installing xcodeproj (0.6.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for -std=c99 option to compiler... yes
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-CoreFoundationlib
--without-CoreFoundationlib
Gem files will remain installed in /tmp/build_t2ezgq9t6vp6/vendor/bundle/ruby/1.9.1/gems/xcodeproj-0.6.0 for inspection.
Results logged to /tmp/build_t2ezgq9t6vp6/vendor/bundle/ruby/1.9.1/gems/xcodeproj-0.6.0/ext/xcodeproj/gem_make.out
An error occurred while installing xcodeproj (0.6.0), and Bundler cannot
continue.
Make sure that `gem install xcodeproj -v '0.6.0'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby/Rails app
我一直在寻找与此类似的错误 - 很多人在安装 Cocoapods 时遇到了这个错误。我安装了这些依赖项的 cocoapods 没问题,命令行工具正在工作,我已经开始在 xcode (4.6.2) 中工作。我正在运行最新的 RVM 1.19.6 和 rails 3.2.13
这不是数据库的问题——我有生产“pg”——我已经部署到 Heroku——问题出在 xcode/cocoapods 依赖项中。您是否听说过 heroku 和这些之间的任何不兼容?我想不出我需要推动 rails 应用程序将 json 文件与 RestKit 等链接起来。这是在转向 xcode 之前唯一让我受不了的事情,所以我真的很想解决这个问题。您能提供的任何帮助将不胜感激!