rbenv use to setup different ruby environment based on your application, it's a nifty tool for development environment especially if your working different Ruby applications.
Installing instruction for rbenv
$ brew install rbenvAdd rbenv's bin path into .rc(.bash_profile) file
export PATH="$HOME/.rbenv/bin:$PATH"Make sure you have reloaded terminal with env changes
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
Installing specific Ruby version Ex. 2.3.4
$ rbenv install 2.3.4Make your Ruby 2.3.4 as global
ruby-build: use openssl from homebrew
Downloading ruby-2.3.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.3.4.tar.bz2
Installing ruby-2.3.4...
Installed ruby-2.3.4 to /Users/home/.rbenv/versions/2.3.4
$ rbenv global 2.3.4Sets the global version of Ruby to be used in all shells by writing the version name to the ~/.rbenv/version file. This version can be overridden by an application-specific .ruby-version file, or by setting the RBENV_VERSION environment variable.
$ ruby -v
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin17]
No comments:
Post a Comment