当我尝试安装rails 3.1版时,终端出现错误:
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/alonbond/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile
make
sh: make: command not found
Gem文件将保留在/Users/alonbond/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/json-1.6.3
中以供检查。
结果记录到/Users/alonbond/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/json-1.6.3/ext/json/ext/parser/gem_make.out
然后我尝试使用rails命令:
Alon-Weissfelds-MacBook-Pro:~ alonbond$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
答案 0 :(得分:0)
尝试从Mac App Store或GCC编译器https://github.com/kennethreitz/osx-gcc-installer安装Xcode。
通常Xcode解决所有这些问题。 GCC并非100%符合所有宝石。