我在我的Gemfile中添加了一些宝石,特别是activerecord,sinatra-activerecord,sqlite3,shotgun和tux。当我运行'捆绑安装'时,我得到了这个奇怪的错误,似乎没有关于它的任何Googleable信息。这是我得到的错误:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
make "DESTDIR=" clean
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
make "DESTDIR="
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
make failed, exit code 69
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.1/gems/bond-0.5.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-12/2.1.0-static/bond-0.5.1/gem_make.out
An error occurred while installing bond (0.5.1), and Bundler cannot continue.
Make sure that `gem install bond -v '0.5.1'` succeeds before bundling.
然后我运行建议的
gem install bond -v '0.5.1'
得到这个:
Building native extensions. This could take a while...
ERROR: Error installing bond:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
make "DESTDIR=" clean
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
make "DESTDIR="
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
make failed, exit code 69
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.1/gems/bond-0.5.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-12/2.1.0-static/bond-0.5.1/gem_make.out
答案 0 :(得分:6)
也许这个问题与最近的XCode更新有关。更新XCode后,您需要执行以下步骤:
第二步似乎取决于您的操作系统版本。如果xcode-select --install
不起作用,请尝试在Install Command Line Developer Tools
中启动/System/Library/CoreServices
应用。
重新安装命令行工具后,尝试重新运行bundle install
。