Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

ruby-gemを使う時はgccをデフォに戻しましょう(戒め

調子にのってGCCの切り替えを行ったわけですが

gemの導入時にエラーを吐く事例が発生しました。
公式をみても、ソレらしいエラーの報告事例が無く途方にくれていました……が
お昼の珈琲をススりながらフと気付きました これgccが原因なんじゃないかと

$ port select --list gcc
Available versions for gcc:
	llvm-gcc42
	mp-gcc48 (active)
	none
$ sudo port select --set gcc none
Selecting 'none' for 'gcc' succeeded. 'none' is now active.
$ . ~/.bashrc 
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

とやったら、

$ gem install http_parser.rb -v '0.5.3
'
Building native extensions.  This could take a while...
/Users/shuzo/.rbenv/versions/1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/ext/builder.rb:69: warning: Insecure world writable dir /usr/local/Cellar in PATH, mode 040777
Successfully installed http_parser.rb-0.5.3
Parsing documentation for http_parser.rb-0.5.3
Installing ri documentation for http_parser.rb-0.5.3
Done installing documentation for http_parser.rb after 0 seconds
1 gem installed

無事bundle install通りました。