I've recently updated to Mountain Lion and re-installed Ruby, but when I try to run a test Rails app, I get an error message that says that "Rails is not currently installed" on my system. I do what it says, type sudo gem install rails
and get:
cleared faster_require caches due to new gem install...
Successfully installed rails-3.2.7
1 gem installed
Installing ri documentation for rails-3.2.7...
Installing RDoc documentation for rails-3.2.7...
But when I check to see which rails version is install, here is what I get:
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.
I've also tried gem install rails
and get:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/aileen/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
creating Makefile
make
compiling generator.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [generator.o] Error 1
Gem files will remain installed in /Users/aileen/.rvm/gems/ruby-1.9.3-p194@rails327/gems/json-1.7.4 for inspection.
Results logged to /Users/aileen/.rvm/gems/ruby-1.9.3-p194@rails327/gems/json-1.7.4/ext/json/ext/generator/gem_make.out
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…