2016-07-11 5 views
2

OS X Yosemite 10.10.5にRuby on Rails v5をインストールしようとしています。 : OS X上で[Ruby on Rails] 5をインストールすると終了コード1エラーが発生するYosemite 10.10.5

http://railsapps.github.io/installrubyonrails-mac.html

は、私はこれを実行すると:

sudo gem install rails --version 5.0.0 --no-ri --no-rdoc 

私はエラーERROR: Failed to build gem native extensionを取得します。 はここで役に立つかもしれない、私のコマンドライン上の出力の一部である:

current directory: /Users/me/.rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8/ext/nokogiri 

[...] 


Running 'compile' for libxml2 2.9.4... ERROR, review '/Users/me/.rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8/ext/nokogiri/tmp/x86_64-apple-da 

rwin14.5.0/ports/libxml2/2.9.4/compile.log' to see what happened. Last lines are: 

[...] 

1 error generated. 
    make[2]: *** [xmlIO.lo] Error 1 
    make[1]: *** [all-recursive] Error 1 
    make: *** [all] Error 2 
    ======================================================================== 
    *** extconf.rb failed *** 
    Could not create Makefile due to some reason, probably lack of necessary 
    libraries and/or headers. Check the mkmf.log file for more details. You may 


    need configuration options. 

[...] 

    To see why this extension failed to compile, please check the mkmf.log which can be found here: 

     /Users/me/.rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-14/2.3.0/nokogiri-1.6.8/mkmf.log 


    extconf failed, exit code 1 

そしてここmkmf.logファイルの一部です:私は何が起こっているか見当がつかない

"gcc -o conftest -I/Users/me/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/x86_64-darwin14 -I/Users/me/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/backward -I/Users/me/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/thanos/.rvm/rubies/ruby-2.3.0/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib  -lruby.2.3.0 -lpthread -ldl -lobjc " 
/Users/me/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:395: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main(int argc, char **argv) 
4: { 
5: return 0; 
6: } 
/* end */ 

:(。?誰かが助けることはでき

RUBY VERSION:2.3.0p0 RubyGemsのバージョン:2.5.1

Xcodeの選択が正常にインストールされて

ありがとうございます!

+0

'gem env'を実行すると、どのバージョンのrubygemsがありますか?また、xcodeライセンス( 'sudo xcodebuild -license')を受け入れましたか? – Hugo

+0

RUBYGEMSバージョン:2.5.1。私はライセンスを受け入れましたが、私はまだ同じエラーが発生します。ありがとう。 – Thanos

答えて

0

私はそれを解決しました。 エラーはノコギリと関係がありました。私は--use-system-librariesパラメータとは別にそれをインストール:

gem install nokogiri --use-system-libraries 

と私はエラーなしでレールをインストールするには、その後の管理しました。

関連する問題