2012-10-29 185 views
0

我一直在試圖在我的macbook上安裝導軌,並且一直有這麼多的困難! 我安裝RVM,當我運行「寶石安裝護欄,」我得到這個消息:無法在mac上安裝導軌

gem install rails 
Building native extensions. This could take a while... 
ERROR: Error installing rails: 
    ERROR: Failed to build gem native extension. 

    /Users/stephanie/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb 
creating Makefile 

make 
/usr/bin/gcc-4.2 -I. -I/Users/stephanie/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/x86_64-darwin11.4.0 -I/Users/stephanie/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/ruby/backward -I/Users/stephanie/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1 -I. -DJSON_GENERATOR -I/Users/mpapis/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -I/opt/sm/pkg/active/include -fno-common -pipe -O3 -Wall -O0 -ggdb -o generator.o -c generator.c 
/usr/bin/gcc-4.2 -dynamic -bundle -o generator.bundle generator.o -L. -L/Users/mpapis/.rvm/rubies/ruby-1.9.2-p320/lib -L/Users/mpapis/.rvm/usr/lib -L. -L/opt/sm/pkg/active/lib -L/usr/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc 
ld: warning: directory not found for option '-L/Users/mpapis/.rvm/rubies/ruby-1.9.2-p320/lib' 
ld: warning: directory not found for option '-L/Users/mpapis/.rvm/usr/lib' 
ld: warning: directory not found for option '-L/opt/sm/pkg/active/lib' 
ld: library not found for -lruby.1.9.1 
collect2: ld returned 1 exit status 
make: *** [generator.bundle] Error 1 

我試着用搜索引擎解決方案,但沒有發現任何東西。有沒有人有想法?謝謝!

+1

http://stackoverflow.com/questions/9552292/failed-to-build-gem-native-extension – alestanis

+0

你安裝了紅寶石嗎? – alestanis

+0

也許[這](http://rocksolidwebdesign.com/notes-and-fixes/ruby-xcode/)可以幫助 – alestanis

回答

0

你所得到的錯誤有一個有趣的路線:

ld: library not found for -lruby.1.9.1 

這讓我覺得有一個與你的Ruby安裝問題。

似乎已經出現在Xcode和紅寶石問題安裝在Mac計算機上(見這個問題here,超過here在這一篇文章)。

重新安裝紅寶石應該讓思考工作。

+0

Downvoter,請解釋。 – alestanis