'Ruby has disappeared. Help me reinstall ruby-1.9.3-p194
I'm brand new to Ruby and Ruby on Rails, and am currently going through Michael Hartl's Ruby on Rails tutorial. Or at least I was before trying to load install some open source code led me down a dark journey. I somehow managed to delete any version of Ruby from my computer and RVM won't let me reinstall it using rvm install 1.9.3 (or using the Jewelry Box). I also tried uninstalling Xcode and installing osx-gcc-installer per other instructions I found to no avail.
Added context: running ruby -v makes the system hang.
Here's the error:
ruby-1.9.3-p194 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/usr/local/rvm/usr/lib ./configure --enable-shared -- disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p194', please read /usr/local/rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.
Here's the relevant part of the log:
checking build system type... x86_64-apple-darwin12.2.0
checking host system type... x86_64-apple-darwin12.2.0
checking target system type... x86_64-apple-darwin12.2.0
checking whether the C compiler works... no
configure: error: in `/usr/local/rvm/src/ruby-1.9.3-p194':
configure: error: C compiler cannot create executables
See `config.log' for more details
Any help would be greatly appreciated!
Solution 1:[1]
Reinstall everything!!!
That may sound like a noob one-hit-wonder type of solution. But trust me when I say it will save you time
EDIT: Things to do is...
- Install homebrew, if you don't already have it.
- Implode RVM. This would take down all the rubies and remove RVM
- If you are on OS X Mountain Lion, run
CC=/Developer/usr/bin/gcc. This uses good old gcc - Reinstall RVM
rvm install 1.9.3- Enjoy (:
Solution 2:[2]
If you're on Mac OS X, you might have a much easier time getting Ruby 1.9.3-p194 using homebrew.
The installation with homebrew installed should be as easy as:
$ brew install ruby
There are quite a few other resources available to you that are linked specifically by version; Lion, Snow Leopard, Leopard, etc... at download ruby.
Solution 3:[3]
I think you can edit as follows and it will be resolved
https://github.com/railsinstaller/railsinstaller-nix/issues/10
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Community |
| Solution 2 | Glorfindel |
| Solution 3 | Andy |
