Skip to content

Setup Ruby & Rails

Fahrizal Septrianto edited this page Jun 6, 2020 · 1 revision

Steps:

  1. Install Chruby
  2. Auto Switching
  3. Install Ruby
  4. Apply changes

wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
tar -xzvf chruby-0.3.9.tar.gz
cd chruby-0.3.9/
sudo make install

If you want chruby to auto-switch the current version of Ruby when you cd between your different projects, simply load auto.sh in ~/.bashrc or ~/.zshrc:

source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh

Go to link!

4. Apply changes

Restart terminal by close terminal or reload the .bashrc or .zshrc

source ~/.bashrc
source ~/.zshrc

Clone this wiki locally