読者です 読者をやめる 読者になる 読者になる

regepanのはてなブログ

個人的なメモ帳レベルの文章。

rbenvでruby 2.1.1がinstallでエラーがでた。→解決。

これ。
➜ ~ rbenv install 2.1.1
Downloading ruby-2.1.1.tar.gz...

Installing ruby-2.1.1...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755
Results logged to /var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755.log

Last 10 log lines:
x ruby-2.1.1/GPL
x ruby-2.1.1/vmtc.inc
x ruby-2.1.1/probes_helper.h
x ruby-2.1.1/ruby_atomic.h
/var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755/ruby-2.1.1 /var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755 ~
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
./configure: line 3390: /usr/bin/gcc-4.2: No such file or directory
configure: error: clang version 3.0 or later is required

BUILD FAILED

Inspect or clean up the working tree at /var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755
Results logged to /var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755.log

Last 10 log lines:
x ruby-2.1.1/vmtc.inc
x ruby-2.1.1/probes_helper.h
x ruby-2.1.1/ruby_atomic.h
/var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755/ruby-2.1.1 /var/folders/gp/zjm47mwx75qbxnkbd4jwr2p00000gn/T/ruby-build.20140424010255.97755 ~
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
./configure: line 3390: /usr/bin/gcc-4.2: No such file or directory
configure: error: clang version 3.0 or later is required
make: *** No targets specified and no makefile found. Stop.

解決策

Issue installing ruby on Mavericks · Issue #481 · sstephenson/rbenv · GitHub
このissueの一番下のコマンド打ったらinstallできた。
他にもちょこちょこやってたけど。。

実行環境

Mac OSX 10.9.2

rbenv versions
system
* 2.0.0-rc2 (set by /Users/{ユーザー名}/.rbenv/version)
2.1.1

できた。

ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

パーフェクトRuby (PERFECT SERIES 6)

パーフェクトRuby (PERFECT SERIES 6)