Can anyone please give directions on how to install ruby 1.9 I tried installation directions given all over the web. Can't get it to work. Please kindly give step by step direction. I tried using macports but everytime I type in ruby -v it gives me 1.8.6.
There's no need to download Ruby source code and compile for macOS because Homebrew and software version managers such as asdf, chruby, rbenv, or rvm provide Ruby installation utilities. If you are building only one project with Ruby (for example, if you are a student learning Ruby), install Ruby with Homebrew.
ruby-build can also be used as a standalone program without rbenv. It is available for macOS, Linux, and other UNIX-like operating systems.
Pre-installed macOS system Ruby MacOS comes with a “system Ruby” pre-installed. If you see /usr/bin/ruby when you use the which command, it is the pre-installed macOS system Ruby.
rvm is easiest way to manage your ruby installation on OSX.
If you are using rvm, you will able to install 1.9.1, 1.9.2, jruby, ree by typing rvm install 1.9.1
type rvm default
to reset your ruby version back to 1.8.6
How to install rvm
sudo gem install rvm -s http://gemcutter.org/
rvm-install
rvm install 1.9.1
rvm use 1.9.1
ruby -v # show ruby 1.9.1 version
rvm default
ruby -v # show ruby 1.8.6 version
cheers
Install Homebrew.
brew install ruby
installs the current stable version of ruby.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With