Last updated in Feb 2015
Many Linux distributions provide Ruby packages in repositories, but I still find RVM is the best way of installing Ruby and managing its versions and packages.
In my Ubuntu, first install dependencies (c compiler and curl)
Second, install a few libraries
Update (Jan 2015): Add its GPG key of RVM as follows:
Now install RVM
and add those lines to ‘$HOME/.bashrc’
which initialize RVM environment in each BASH session. And source the ‘.bashrc’ file
Now it is time to install Ruby. But before that, check
and it gives you all the packages needed for Ruby installation. Install them before proceeding.
At last, install the Ruby. At the time of writing, the newest Ruby stable version is 2.1.2, so type:
The latest stable Ruby version can be found here.
Jekyll is a Ruby gem. So it can be installed with
sudo apt-get install g++ gem install therubyracer
Updated: Aug 2016
The new Jekyll simplify the process, and the build can be automated by the Gemfile and bundle. See Github doc here for more information.
To run Jekyll with a public IP, do
bundle exec jekyll serve --host=0.0.0.0
The “–host=0.0.0.0” will bind server to all IP address rather than the localhost by default.
Jekyll tutorials can be found in Jekyll’s website.