Friday, March 16, 2018

How to install rbenv and Ruby build

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 rbenv
Add rbenv's bin path into .rc(.bash_profile) file
export PATH="$HOME/.rbenv/bin:$PATH" 
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
Make sure you have reloaded terminal with env changes

Installing specific Ruby version Ex. 2.3.4
$ rbenv install 2.3.4

ruby-build: use openssl from homebrew
Downloading ruby-2.3.4.tar.bz2...

Installing ruby-2.3.4...

Installed ruby-2.3.4 to /Users/home/.rbenv/versions/2.3.4

Make your Ruby 2.3.4 as global 
$ rbenv global 2.3.4
$ ruby -v
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin17]
Sets 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.

Install ZSH and Oh My Zsh on your Mac

In order to Install zsh on your mac, make sure you've installed Homebrew on your machine. Homebrew is a package manger for macOS and very handy tool to install any packages on your mac.

If you haven't installed Homebrew, have a look and follow the install instructions.

Installing ZSH

$ brew install zsh
This command will install zsh on your machine

Oh My Zsh

It's a framework for managing your ZSH configuration and more than 200+ plugins. would recommend to try this.Visit and follow the install instructions
$ sh -c "$(curl -fsSL"
You can install any kind of plugins such as github