I am new to Terminal, so please carry me. The successful installation of the following has been completed (in this order):
- xcode 4.5
- RVM 1.16
- GCC 4.2.1
- Ruby 1.9.3
When I try to install Rails ("gem install rails"), the installation starts, but then fails with the error: "Failed to create your own gem extension." I donβt know what this refers to. Ideas? Anything else I need to install in advance?
The first time I tried to install Rails, I accidentally ran it using sudo. Will it affect anything?
Edit: and output is -
Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /Users/staffanestberg/.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/staffanestberg/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5 for inspection. Results logged to /Users/staffanestberg/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
Edit: Allowed using the iouri clause. Add export CC=gcc to your .bash profile, then create a symlink for the correct compiler,
sudo ln -sf /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2
Staffan estberg
source share