繁体   English   中英

无法在Mac上安装Rails

[英]Cannot install rails on mac

我一直在尝试在Macbook上安装滑轨,并且遇到了很多困难! 我安装了RVM,然后在运行“ gem install rails”时收到以下消息:

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

我已经尝试使用谷歌搜索解决方案,但没有发现任何东西。 有人有想法吗? 谢谢!

您遇到的错误有一条有趣的线:

ld: library not found for -lruby.1.9.1

这使我认为您的Ruby安装存在问题。

这似乎已经出现在Xcode的问题和红宝石在Mac计算机上(见这个问题安装在这里 ,并在此上的一篇文章在这里 )。

重新安装红宝石应该可以使工作正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM