Ruby 2.6 on OSX 10.11+ via Homebrew
OLDER VERSION (e.g. 2.0 or less) has issues with expired certificates, and GEMS stop working. GEM INSTALL XXXXX cannot connect.
Quick & Dirty solution – if you do not depend on a specific version of Ruby:
1 brew install ruby
*If homebrew is not installed, read THIS
DON’T FORGET TO UPDATE YOUR PATHS IN .bash_profile
1
2
3
4
5 # Setting PATH for Ruby
export PATH=/usr/local/opt/ruby/bin:$PATH
export GEM_HOME=/usr/local/opt/ruby/lib/ruby/gems/2.6.0
export GEM_PATH=/usr/local/opt/ruby/lib/ruby/gems/2.6.0
export PATH=/usr/local/opt/ruby/lib/ruby/gems/2.6.0/bin:$PATH
Other usefull:
1
2
3
4
5
6
7
8
9
10
11
12 # Setting PATH for Ruby
ruby -v
gem -v
gem help commands
gem environment // gem env
gem list
gem install GEM-NAME
gem uninstall GEM-NAME
gem install rubygems-update
update_rubygems
gem update --system
SOURCES:
RUBY-LANG.ORG,
RUBYGEMS