CRISPR× Fabio Liberante

Installing Ruby in Ubuntu 14.04 with Z shell (zsh)

Installing the latest version of Ruby into Ubuntu 14.04 is painless using the method desribed here. If you're using bash that is! If you're using Z shell, which is what all the cool kids are using these days, you need to insert the Ruby environment paths into your Z shell environment instead.

I have edited the commands below from the Go Rails rbenv method.

The first step is to install some dependencies for Ruby.

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev

Installing with rbenv is a simple two step process. First you install rbenv, and then ruby-build:

git clone git:// .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL

git clone git:// ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.zshrc
exec $SHELL

git clone ~/.rbenv/plugins/rbenv-gem-rehash

rbenv install 2.2.3
rbenv global 2.2.3
ruby -v

Now we tell Rubygems not to install the documentation for each package locally and then install Bundler

echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler

From this point I followed the GitHub pages tutorial on installing their gem. I find it better to do it via a Gemfile within the working directory for the Jekyll site.