I am new to Ruby and by default has a version of 2.0.0
Ruby on my mac. I tried to get the latest version and followed this question: How to upgrade Ruby to 1.9.x on Mac? but even then the latest version remains 2.0.0
. I copied some terminal commands that I used:
Last login: Sun Oct 11 19:58:56 on console
Manish-MBP:~ manishgiri$ ruby -v
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
Manish-MBP:~ manishgiri$ \curl -L https://get.rvm.io | bash -s stable --ruby
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 102 0 0:00:01 0:00:01 --:--:-- 102
100 22721 100 22721 0 0 9052 0 0:00:02 0:00:02 --:--:-- 9052
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc',
but no GPG software exists to validate it, skipping.
Installing RVM to /Users/manishgiri/.rvm/
Adding rvm PATH line to /Users/manishgiri/.profile /Users/manishgiri/.mkshrc /Users/manishgiri/.bashrc /Users/manishgiri/.zshrc.
Adding rvm loading line to /Users/manishgiri/.profile /Users/manishgiri/.bash_profile /Users/manishgiri/.zlogin.
Installation of RVM in /Users/manishgiri/.rvm/ is almost complete:
* To start using RVM you need to run `source /Users/manishgiri/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.2.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.2.1',
showing last 15 lines of /Users/manishgiri/.rvm/log/1444608144_ruby-2.2.1/update_system.log
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.'
++ /scripts/functions/logging : rvm_error() 115 > rvm_pretty_print stderr
++ /scripts/functions/logging : rvm_pretty_print() 73 > case "${rvm_pretty_print_flag:=auto}" in
++ /scripts/functions/logging : rvm_pretty_print() 78 > case "${TERM:-dumb}" in
++ /scripts/functions/logging : rvm_pretty_print() 81 > case "$1" in
++ /scripts/functions/logging : rvm_pretty_print() 83 > [[ -t 2 ]]
++ /scripts/functions/logging : rvm_pretty_print() 83 > return 1
++ /scripts/functions/logging : rvm_error() 117 > printf %b 'Failed to update Homebrew, follow instructions here:
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.\n'
Failed to update Homebrew, follow instructions here:
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
++ /scripts/functions/requirements/osx_brew : requirements_osx_brew_update_system() 381 > return 1
Requirements installation failed with status: 1.
Manish-MBP:~ manishgiri$ brew update
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local
Manish-MBP:~ manishgiri$ sudo chown -R $(whoami):admin /usr/local
Password:
Manish-MBP:~ manishgiri$ ruby -v
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
Manish-MBP:~ manishgiri$
It seems that there was a problem with the homegrown, so I decided to update it. I made a section to change ownership and permissions and followed the instructions on this - How do I upgrade Homebrew? and execute brew update
. I got an answer Already upto date
.
rvm list known
, , rvm install current && rvm use current
. :
Last login: Sun Oct 11 20:01:18 on ttys000
Manish-MBP:~ manishgiri$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p643]
[ruby-]2.1.4
[ruby-]2.1[.5]
[ruby-]2.2[.1]
[ruby-]2.2-head
ruby-head
# for forks use: rvm install ruby-head-<name> --url https://github.com/github/ruby.git --branch 2.1
# JRuby
jruby-1.6.8
jruby[-1.7.19]
jruby-head
jruby-9.0.0.0.pre1
# Rubinius
rbx-1.4.3
rbx-2.4.1
rbx[-2.5.2]
rbx-head
# Opal
opal
# Minimalistic ruby implementation - ISO 30170:2012
mruby[-head]
# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]
# GoRuby
goruby
# Topaz
topaz
# MagLev
maglev[-head]
maglev-1.0.0
# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head
# IronRuby
ironruby[-1.1.3]
ironruby-head
Manish-MBP:~ manishgiri$ rvm install current && rvm use current
system
Now using system ruby.
, 2.2.3
, ruby -v
, : ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
.
? RubyInstaller Windows PC 2.2.3
.