RVM

# Install pre-requirements
$ apt-get --no-install-recommends --yes install gawk libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgmp-dev libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev libgmp-dev libreadline-dev

$ \curl -sSL https://get.rvm.io | bash -s stable --ruby --gems=bundler

Bundle

Bundle config

$ bundle config mirror.https://rubygems.org https://gems.ruby-china.org

Nogokiri

$ gem install nokogiri

#在 OSX 上安装失败时,可以先尝试
$ xcode-select --install