2012-10-29 152 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