【发布时间】:2013-09-23 20:34:11
【问题描述】:
我正在尝试加入 bcrypt-ruby,v. 3.0.1。我在我的 gem 文件中输入 gem 如下:
gem 'bcrypt-ruby', '3.0.1'
然后我去终端运行:
bundle install
我收到以下回复:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
creating Makefile
make
compiling bcrypt_ext.c
make: gcc-4.2: No such file or directory
make: *** [bcrypt_ext.o] Error 1
Gem files will remain installed in /Users/philip7899/.bundler/tmp/2186/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /Users/philip7899/.bundler/tmp/2186/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
An error occurred while installing bcrypt-ruby (3.0.1), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '3.0.1'` succeeds before bundling.
我对 Ruby 和 Rails 都非常陌生,不知道如何解决这个问题。我看过其他有类似问题的 stackoverflow 页面,但没有一个能够帮助我。我最近升级到 Mountain Lion,并被告知这可能是一个问题。有人告诉我使用 RVM 卸载然后重新安装 Ruby。我试过了,还是不行。
请帮忙。谢谢。
【问题讨论】:
-
能否请您附上
/Users/philip7899/.bundler/tmp/2186/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out的内容?
标签: ruby-on-rails gem bundler bcrypt bcrypt-ruby