Installing Ruby
Jekyll is written in Ruby, so the first step is to get the Ruby language environment.
First get the Ruby environment: rbenv
Like python has pip, Ruby has an environment manager called rbenv, that makes it easier to install and manage Ruby versions.
You can find installed Ruby versions at
~/.rbenv/versions/
rbenvintercepts calls to ruby executables, checks the Ruby version set in yourproject_dir/.ruby-versionand targets the appropriate Ruby installation.
# Install latest rbenv by cloning the repo
mkdir ~/.rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
# set up shell to load rbenv
~/.rbenv/bin/rbenv init
Then install the pre-requisites for Ruby
sudo apt-get install autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev
# consumes ~581 MB
Finally, get Ruby
# list available ruby versions
rbenv install -L
# If that fails (no such command):
# install the ruby-build plugin by cloning the repo
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
# placed at ~/.rbenv/plugins/ruby-build
# listing Ruby versions should now succeed. I picked the latest for install:
rbenv install 3.4.4
# tar.gz download: 22 Mb. Install takes: 149 Mb
#set as global:
rbenv global 3.4.4
Managing Ruby versions with rbenv
To find a particular version directory:
rbenv prefix x.y.z
To uninstall a Ruby version, you could either:
rm -rf ~/.rbenv/versions/x.y.z
Or, use rbenv uninstall provided by ruby-build.
Now, follow the Jekyllrb guide for installing Jekyll