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の両方に非常に慣れていないため、これを修正する方法がわかりません. 同様の質問がある他のスタックオーバーフローページを見たことがありますが、どれも私を助けることができませんでした. 最近、Mountain Lion にアップグレードしましたが、これが問題になる可能性があると言われました。RVM を使用して Ruby をアンインストールしてから再インストールするように言われました。私はそれを試しましたが、うまくいきませんでした。
助けてください。ありがとうございました。