読了: 約 3 分

といいつつも皆さん大好きQiitaに解決策があったのでやってみました。

programer

photo credit: kasrak via photopin cc

makeとgccの解決

上記のQiitaに書いてあるのですが、xcodeでcommandlineのインストールをします。
まず、makeが実行出来てない刈田ので、そしたらmake実行したら今度はgccで怒られる。

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

        /Users/xxx/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb 
creating Makefile

make
sh: make: command not found


Gem files will remain installed in /Users/xxx/projectname/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /Users/xxx/projectname/vendor/bundle/ruby/1.9.1/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.

となるので

bcrypt-rubyをインストールします。

/Users/xxxx/.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

gcc-4.2がないですよと。

$ gcc -v
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

こいつかということで。
シンボリックリンク貼って再度bundle installするといけました。

$  sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
$ bundle install --path vendor/bundle
$ rvmsudo rails s -p 80
Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run:

    export rvmsudo_secure_path=1

to avoid the warning, put it in shell initialization file to make it persistent.

In case there is no `secure_path` in `/etc/sudoers`. Run:

    export rvmsudo_secure_path=0

to avoid the warning, put it in shell initialization file to make it persistent.
Password:
Resque::Helpers will be gone with no replacement in Resque 2.0.0.
Resque::Helpers will be gone with no replacement in Resque 2.0.0.

参考

http://loveless-ainakimono.seesaa.net/article/232323709.html