我无法在mac上正确安装rails

时间:2013-08-06 07:01:42

标签: ruby-on-rails macos install

我尝试在Mac上安装rails仍然存在错误

我真的很沮丧,想要一些建议

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

 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
 creating Makefile

 make "DESTDIR="
 xcrun cc -I. -I. -        I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-   darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common   -c atomic_reference.c
 xcrun: Error: could not stat active Xcode path '/Developer'. (No such file or     directory)
 cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o    atomic_reference.bundle atomic_reference.o -L. -  L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64     -lruby  -lpthread -ldl -lobjc  
 clang: error: no such file or directory: 'atomic_reference.o'
 make: *** [atomic_reference.bundle] Error 1


 Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/atomic-1.1.12 for    inspection.
 Results logged to /Library/Ruby/Gems/1.8/gems/atomic-1.1.12/ext/gem_make.out

1 个答案:

答案 0 :(得分:0)

我发现最好的方法是使用Homebrew和RVM。有一个很好的Railscast:http://railscasts.com/episodes/310-getting-started-with-rails