Before I can say: “I’ve tried everything”, I should post here. So, here is my problem.
I had a problem with ruby 1.9.3-p194. My terminal just got stuck on every(!) command involving ruby or rails. (e.g. rails s mongrel or even rails -v and ruby -v)
It all started with this strange thing:
$ rvm use 1.9.3-p194
Using /usr/local/rvm/gems/ruby-1.9.3-p194
$ bundle exec rails s mongrel
and then it got stuck.
So, I wanted to know which versions of ruby I got installed:
$ rvm list
rvm rubies
ruby-1.8.7-p370 [ i686 ]
# => - current
# =* - current && default
# * - default
Huh?! So am I using a non-installed ruby-version?
After some research many advices were to reinstall the whole package.
So, I tried.
$ rvm uninstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
and again, just to make sure..
$ rvm uninstall 1.9.3-p194
/usr/local/rvm/src/ruby-1.9.3-p194 has already been removed.
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
Well, that looks good. (Except for the fact that half of it was already removed on the first try… 😐 )
Then:
Error #1
$ rvm reinstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #autoreconf
Error running 'autoreconf', please read /usr/local/rvm/log/ruby-1.9.3-p194/autoreconf.log
Skipping configure step, 'configure' does not exist, did autoreconf not run successfully?
ruby-1.9.3-p194 - #compiling
Error running 'make', please read /usr/local/rvm/log/ruby-1.9.3-p194/make.log
There has been an error while running make. Halting the installation.
next step was:
$ rvm uninstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
Removing default ruby interpreter
$ rvm list
rvm rubies
# No rvm rubies installed yet. Try 'rvm help install'.
So I checked the help install, but found nothing that might help. At least, I haven’t seen a solution..
Next:
Error #2
$ rvm install 1.9.3-p194
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /usr/local/rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194
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.
Now, I wanted to uninstall rvm:
$ brew uninstall rvm
Error: No such keg: /usr/local/Cellar/rvm
Okay.. Let’s check if it still works..?
$ rvm
<listed standard output, thought that'd be useless here..>
Yes, it’s still there. Let’s try to install 1.9.3 again..
Error #2 (Same as before..)
$ rvm install 1.9.3
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /usr/local/rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #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-p327', please read /usr/local/rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
Then I found a ‘solution…’, #not..
$ umask g+w
$ export -a rvm_configure_env
$ rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')
Didn’t work out..
I tried to install 1.9.3 again, which again raised error #2
That’s it I thought. Let’s implode the whole bunch.. (read that as a possible solution)
$ rvm implode
Are you SURE you wish for rvm to implode?
This will recursively remove /usr/local/rvm and other rvm traces?
(anything other than 'yes' will cancel) > yes
Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and rvm-auto-ruby)
Removing rvm wrappers in /usr/local/rvm/bin
Hai! Removing /usr/local/rvm
rm: /etc/profile.d/rvm.sh: Permission denied
/usr/local/rvm has been removed.
rvm has been fully removed. Note you may need to manually remove /etc/rvmrc and ~/.rvmrc if they exist still.
Oh.. Permission denied nice…
$ sudo rvm implode
Password:
sudo: rvm: command not found
Hurrayy! It finally is removed.
Let’s install it again..
$ gem install rvm
Successfully installed rvm-1.11.3.5
1 gem installed
Installing ri documentation for rvm-1.11.3.5...
Installing RDoc documentation for rvm-1.11.3.5...
What?! After just one try? Okay.. 🙂
But then….
Error #3
$ rvm install 1.9.3-p194
cat: /usr/local/rvm/VERSION: No such file or directory
-bash: /usr/local/rvm/scripts/base: No such file or directory
Unrecognized command line argument: 'impode' ( see: 'rvm usage' )
impode.. ? Whut?! Well, this is probably from an earlier typo..
Then I tried some other commands returning the same error over and over again:
ifonteijne:dash Kers$ rvm install 1.9.3-p194 cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'imstall' ( see: 'rvm usage' ) ifonteijne:dash Kers$ rvm impode cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'impode' ( see: 'rvm usage' ) ifonteijne:dash Kers$ rvm implode cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'impode' ( see: 'rvm usage' ) ifonteijne:dash Kers$ rvm install cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'impode' ( see: 'rvm usage' )
Now I am stuck as …..
If someone can help me out, please.
I want to install: Ruby 1.9.3-p194 through RVM
== Edit ==
Tried:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
# Kers,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne
Well, that worked.
$ rvm install 1.9.3-p194
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
You requested building with '/Developer/usr/bin/gcc' but it is not in your path.
$ brew install gcc
==> Installing gcc dependency: gmp
==> Downloading http://ftpmirror.gnu.org/gmp/gmp-5.0.5.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/gmp/5.0.5 --enable-cxx --build=x86_64-apple-darwin
==> make
==> make check
==> make install
(...)
Xcode: 4.5.2 => /Volumes/SATA/Applications/Xcode.app/Contents/Developer
CLT: 1.0.0.9000000000.1.1249367152
Error: Homebrew doesn't know what compiler versions ship with your version of
Xcode. Please file an issue with the output of `brew --config`:
https://github.com/mxcl/homebrew/issues
Error: Failed executing: make (mpfr.rb:31)
As was said:
$ brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: 360be75b4c4e286365d71664d9a8ab277d7b1fb3
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.8.2-x86_64
Xcode: 4.5.2 => /Volumes/SATA/Applications/Xcode.app/Contents/Developer
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.2: build 5666
LLVM-GCC: build 2335
Clang: 2.1 build 163
X11: 2.7.3 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Hope this might help.
Fixed it thanks to the comment of rik.vanmechelen.
Conclusion:
Remove Ruby
Install Ruby
Note:
==> Make Bootstraptakes a (very) long time.Install gcc
Note: This is not the standard command for it, I used it because of a Xcode ‘Command line’ error.
Install Rails
Then I was good to go.
rik.vanmechelen, thanks again.