Ruby - cllu/.rc GitHub Wiki

Choose rbenv over rvm

There are mainly two environment manager for Ruby, rbenv and rvm. rvm is considered more established, but also the most intrusive in terms of shell modifications[1]. rbenv is more lightweight and works well with Homebrew on OSX, and is my preferred way.

On OSX, install rbenv via Homebrew

$ brew install rbenv ruby-build

On Linux, use the shell script:

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ # Done. the `PATH` and `eval "$(rbenv init -)"` are already taken care.

After rbenv, install at least one Ruby version:

$ rbenv install 2.3.1
$ rbenv global 2.3.1

To install gem:

$ gem install sass
$ rbenv rehash # link the executable from `~/.rbenv/versions/2.2.3/bin` to `~/.rbenv/shims`

Global packages

  • sass

References