Skip to content

Instantly share code, notes, and snippets.

@therod
Last active September 28, 2017 15:35
Show Gist options
  • Save therod/aa113f40db544bec2e3c7d0cefecf9ae to your computer and use it in GitHub Desktop.
Save therod/aa113f40db544bec2e3c7d0cefecf9ae to your computer and use it in GitHub Desktop.

Master21 - Installation rbenv

Mac OS X

  1. Open the Terminal app
  2. Install rbenv using homebrew with brew install rbenv
  3. Install ruby-build using homebrew with brew install ruby-build
  4. Copy and paste following code into your terminal window: echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile and hit return.
  5. Copy and paste following code into your terminal window: echo 'eval "$(rbenv init -)"' >> ~/.bash_profile and hit return.
  6. Close your terminal window and open a new one.
  7. Type in rbenv install 2.4.2 and hit return.
  8. Ruby is now installing, this might take a while.
  9. After the installation is finished type in rbenv global 2.4.2
  10. Type in rbenv versions and check if you get something like this: * 2.4.2 (set by /Users/rodrigo/.rbenv/version)

Windows (with Ubuntu bash)

  1. Open the bash terminal
  2. Type in sudo apt install ruby and follow the instructions on screen.
  3. Type in sudo apt install git and follow the instructions on screen.
  4. Copy and paste following code into your terminal window: git clone https://github.com/rbenv/rbenv.git ~/.rbenv and hit return.
  5. copy and paste following code into your terminal window: git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build and hit return.
  6. Copy and paste following code into your terminal window: echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc and hit return.
  7. Copy and paste following code into your terminal window: echo 'eval "$(rbenv init -)"' >> ~/.bashrc and hit return.
  8. Close your termial and open a new one.
  9. Type in sudo apt install build-essential and follow the instructions on screen.
  10. Type in rbenv install 2.4.2 and hit return.
  11. Ruby is now installing, this might take a while.
  12. After the installation is finished type in rbenv global 2.4.2
  13. Type in rbenv versions and check if you get something like this: * 2.4.2 (set by /Users/rodrigo/.rbenv/version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment