安装bcrypt-ruby(3.1.2)时发生错误,Bundler无法继续

时间:2013-11-27 21:39:46

标签: ruby-on-rails bundler

我尝试运行bundle,我收到了这个奇怪的错误:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/me/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for ruby/util.h... *** 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.

1 个答案:

答案 0 :(得分:4)

我检查了mkmf.log文件,发现了错误消息。

$ cat /Users/me/.rvm/gems/ruby-2.0.0-p247@centralize/gems/bcrypt-ruby-3.1.2/ext/mri/mkmf.log

...

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo

...

我刚刚更新了XCode。所以我打开了XCode,果然,我不得不同意使用条款,并允许安装运行。 bundle运行完美,完成!

相关问题