2013-04-20 227 views
2

所以我試圖在運行Mountain Lion的Mac上安裝Ruby 1.9.3。我安裝了xCode並且是最新的。我已經安裝了RVM,現在正在嘗試使用rvm install 1.9.3安裝Ruby當我運行這個它看起來像它會安裝,但給我一個錯誤,請參閱以下內容:安裝Ruby - RVM - Mac OSX Mountain Lion

rvm install 1.9.3 
Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p392. 
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. 
Installing requirements for osx, might require sudo password. 
Already up-to-date. 
Certificates in '/Users/Colin/.rvm/etc/openssl/cert.pem' already are up to date. 
Installing Ruby from source to: /Users/Colin/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection... 
ruby-1.9.3-p392 - #extracted to /Users/Colin/.rvm/src/ruby-1.9.3-p392 (already extracted) 
ruby-1.9.3-p392 - #configuring........ 
Error running './configure --prefix=/Users/Colin/.rvm/rubies/ruby-1.9.3-p392 --with-opt-dir=/Users/Colin/.rvm/opt/libyaml:/Users/Colin/.rvm/opt/readline:/Users/Colin/.rvm/opt/libxml2:/Users/Colin/.rvm/opt/libxslt:/Users/Colin/.rvm/opt/libksba:/Users/Colin/.rvm/opt/openssl:/Users/Colin/.rvm/opt/sqlite --disable-install-doc --without-tcl --without-tk --enable-shared', 
please read /Users/Colin/.rvm/log/ruby-1.9.3-p392/1366429269_configure.log 
There has been an error while running configure. Halting the installation. 

當我去/1366429269_configure.log它說這樣的文件:

[2013-04-19 20:41:09] ./configure 
configure: WARNING: unrecognized options: --without-tcl, --without-tk 
checking build system type... x86_64-apple-darwin12.2.1 
checking host system type... x86_64-apple-darwin12.2.1 
checking target system type... x86_64-apple-darwin12.2.1 
checking whether the C compiler works... no 
configure: error: in `/Users/Colin/.rvm/src/ruby-1.9.3-p392': 
configure: error: C compiler cannot create executables 
See `config.log' for more details 

如果任何人都可以幫助我,它將不勝感激!

編輯:

我試圖解決此Can't install Ruby under Lion with RVM – GCC issuesrvm install 1.9.3 --with-gcc=clang它改了一下,這裏是新的輸出:

rvm install 1.9.3 --with-gcc=clang 
Installing requirements for osx, might require sudo password. 
Already up-to-date. 
Certificates in '/Users/Colin/.rvm/etc/openssl/cert.pem' already are up to date. 
Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms. 
Installing Ruby from source to: /Users/Colin/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection... 
ruby-1.9.3-p392 - #extracted to /Users/Colin/.rvm/src/ruby-1.9.3-p392 (already extracted) 
ruby-1.9.3-p392 - #configuring..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 
ruby-1.9.3-p392 - #compiling.................................................................. 
Error running 'make -j8', 
please read /Users/Colin/.rvm/log/ruby-1.9.3-p392/1366431470_make.log 
There has been an error while running make. Halting the installation. 

而且繼承人的日誌來自:http://pastebin.com/P6nTZRQY

編輯

不知道發生了什麼,但我只是嘗試相同的事情,現在它的工作完美。謝謝大家誰留下了有益的評論,非常感謝!

+0

什麼版本的rvm? – 7stud 2013-04-20 03:55:38

+0

先試試:'rvm get head',然後再次嘗試安裝。 – fmendez 2013-04-20 03:57:22

+1

BTW標題是錯誤的,你要安裝'紅寶石1.9.3',不'Rails' – fmendez 2013-04-20 04:00:31

回答

1

我遇到了類似的問題,試圖在一個月前在Lion上安裝Ruby on Rails。最後,我使用了一個安裝程序。如果使用安裝程序對您來說是一個可行的選項,請查看Rails Installer

+0

我也試了一下,但在安裝之前仍然收到這個錯誤:http://gyazo.com/fd8ebfa6cd6c4c8f9333dd276efbf03d – user1172897 2013-04-20 04:33:06

1

嘗試使用此它將安裝所有

wget --no-check-certificate https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh 
2

您需要更新命令行工具最新版本,也爲Ruby 1.9.3仍然優選使用gcc-4.2編譯。

還要確保您在再次嘗試之前更新RVM:

rvm get head 
rvm install 1.9.2 

最後,紅寶石2.0.0應與1.9.3兼容,你應該更新。

相關問題