2012-10-17 24 views
11

これまでに数多くの投稿がありましたが、指示に従っていますが、何も問題はありません。私は私がやったこと、そして私が従う指示を以下に概説します - どんなアドバイスにも感謝します!Ruby on Mountain Lionをインストールする際の問題 - ruby​​ 1.9.3がコンパイルされない

私は次のインストール手順に従っている: http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac

私はOSXマウンテンライオンのためのX-コードをダウンロードし、とgccコンパイラがインストールされている:

$ gcc --version 
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) 
Copyright (C) 2007 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

指示され、インストールと私は、行っていますgitの最新バージョン

$ git --version 
git version 1.7.10.2 (Apple Git-33) 

同様に、コマンドラインでrvmと同じことをしました:私は、ルビーがRVMを使用してインストールしようとすると

$ rvm --version 
rvm 1.16.13 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 

は、私は次の取得:私は、同様の出力を得る代わりのコマンドラインを使用

$ rvm install 1.9.3 
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p286. 
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. 
Installing Ruby from source to: /Users/mondemoo/.rvm/rubies/ruby-1.9.3-p286, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p286 - #downloading ruby-1.9.3-p286, this may take a while depending on your connection... 
ruby-1.9.3-p286 - #extracted to /Users/mondemoo/.rvm/src/ruby-1.9.3-p286 (already extracted) 
ruby-1.9.3-p286 - #configuring 
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/Users/mondemoo/.rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/Users/mondemoo/.rvm/rubies/ruby-1.9.3-p286', please read /Users/mondemoo/.rvm/log/ruby-1.9.3-p286/configure.log 
There has been an error while running configure. Halting the installation. 

しかし、いくつかの余分なビットを持つ:

$ rvm install 1.9.3 --with-gcc=clang 
-bash: -dumpversion: command not found 
-bash: --version: command not found 
-bash: --version: command not found 
Installing Ruby from source to: /Users/mondemoo/.rvm/rubies/ruby-1.9.3-p286, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p286 - #downloading ruby-1.9.3-p286, this may take a while depending on your connection... 
ruby-1.9.3-p286 - #extracted to /Users/mondemoo/.rvm/src/ruby-1.9.3-p286 (already extracted) 
ruby-1.9.3-p286 - #configuring 
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/Users/mondemoo/.rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/Users/mondemoo/.rvm/rubies/ruby-1.9.3-p286 --with-gcc=clang', please read /Users/mondemoo/.rvm/log/ruby-1.9.3-p286/configure.log 
There has been an error while running configure. Halting the installation. 
-bash: --version: command not found 

$ less /Users/mondemoo/.rvm/log/ruby-1.9.3-p286/configure.log 
[2012-10-17 07:39:15] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/Users/mondemoo/.rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/Users/mondemoo/.rvm/rubies/ruby-1.9.3-p286 --with-gcc=clang 
checking build system type... x86_64-apple-darwin12.2.0 
checking host system type... x86_64-apple-darwin12.2.0 
checking target system type... x86_64-apple-darwin12.2.0 
checking whether the C compiler works... no 
configure: error: in `/Users/mondemoo/.rvm/src/ruby-1.9.3-p286': 
configure: error: C compiler cannot create executables 
See `config.log' for more details 

configure.logsを見ると、私は次の取得します

私は今私が間違っていたことについて完全に混乱しています - 誰でも助けることができますか? cコンパイラ(gcc?)に問題があるようですが、正しく解釈していますか?もしそうなら、私はそれをどのように修正するのですか?また、上記のconfigure.logに記載されているこの「config.log」にはどうしたらいいですか?

ありがとうございます!

+0

端末出力用に4桁の字下げを使用して投稿をフォーマットしてください。 –

+1

それでは、configureログは何を表していますか? – halfelf

+0

/Users/mondemoo/.rvm/log/ruby-1.9.3-p286/configure.logを読んでください。それについては丁寧です。 –

答えて

22

これはRailsInstaller OSXのバグ1.0.3です - あなたは、この含まれて/etc/rvmrcを変更する必要がhttps://github.com/railsinstaller/railsinstaller-nix/issues/10

:バイナリルビーがご利用されたときに、私は、インストーラの新しいバージョンを用意しております

umask g+w 
export -a rvm_configure_env 
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include') 

を2.0.0。

UPDATE:RVM 1.19+/etc/rvmrcの新しいバージョンのためには、次のように変更します。

umask g+w 
export rvm_autolibs_flag=smf 

そしてrvm get stabel #OR: head

+0

私の最後の投稿を無視して、すぐに行が見えるのを見ました。今すぐ試してみましょう。 – MrBernz

+0

完璧、ありがとう! – MrBernz

+0

ありがとう!これは私のために働いた...そしてRuby 2.0.0もインストールする。 – markstewie

1

私はそれを '正しい' やり方をしましたが、私はちょうどRVM(RVMを削除わからないを実行しますruby 1.9.3-p327の最新バージョンがインストールされていて問題なく動作しています(\ curl -L https://get.rvm.io | bash -s stable --ruby)。

+0

私は実際にこれもまた動作するようにしましたが、ネイティブ拡張を必要とする他のものを構築するために他の問題が残っています。 :( – Adron

関連する問題