Skip to content

Install rbenv, rvm & ruby

Thuy Le edited this page Jul 2, 2016 · 1 revision

Additionally to the README.md we have listed here a few more infos about how to install rbenv, rvm and ruby in different environments, at the moment they are: MacOSand Ubuntu.

Index

  • rbenv
  • rvm
  • ruby 2.2.2

Install rbenv

MacOS

$ brew install rbenv ruby-build
$ echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

Ubuntu

$ cd ~ # change into your home directory
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile

Zsh note: Modify your ~/.zshrc file instead of ~/.bash_profile, if you use zsh instead of bash.

Learn more about rbenv here.

Install rvm

MacOS / Ubuntu

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
$ source ~/.rvm/scripts/rvm

Learn more about rvm here.

Install Ruby 2.2.2

MacOS / Ubuntu

via rbenv:

$ rbenv install 2.2.2 # install ruby 2.2.2
$ cd wheelmap # change into your project directory
$ rbenv local 2.2.2 # use ruby 2.2.2 in your project
$ rbenv rehash

List all ruby versions:
$ rbenv versions

via rvm:

$ rvm install 2.2.2
$ cd wheelmap # change into your project directory
$ rvm use 2.2.2 

List all ruby versions:
$ rvm list