Tuesday 4 June 2013

Update to ruby 2.0 with brew and Xcode

Uninstall XCode dev tools

-  sudo /Developer/Library/uninstall-devtools —mode=all

Removing empty devtools directories...
Finish time: Wed  5 Jun 2013 09:12:39 EST


get latest CL xCode from

https://developer.apple.com/downloads/index.action


Select Developer Tools

Search for "Command Line Tools" order by date get the latest one
i get "Command Line Tools (OS X Mountain Lion) for Xcode - April 2013"


check the gcc

- gcc --version

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


IMPORTANT:
after installing CL tools close and open the teminal window (it take me 1 hour to solve this)

http://stackoverflow.com/questions/9323612/xcode-configure-error-no-acceptable-c-compiler-found-in-path


- ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.1.0]


run:

- sudo brew update && brew doctor

-brew install libyaml
and make sure there are not errors


-rvm pkg install openssl

- rvm install 2.0.0 \
    --with-openssl-dir=$HOME/.rvm/usr \
    --verify-downloads 1

-rvm use 2.0.0


OR

- CC=clang rvm reinstall 2.0.0-p0


- sudo brew install git

------------------------------------------------------------------

Saving wrappers to '/Users/ioannis/.rvm/wrappers/ruby-2.0.0-p195'........

ruby-2.0.0-p195 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p195 - #importing default gemsets, this may take time.......................
Install of ruby-2.0.0-p195 - #complete


➜  Xcode  rvm use 2.0.0 --default
Using /Users/ioannis/.rvm/gems/ruby-2.0.0-p195
➜  Xcode  ruby -v
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
➜  Xcode

:)








No comments:

Post a Comment