Task: install jekyll with github-pages extenshions on Ubuntu 14.04 Trusty.
Add ppa with stable ruby versions built by this guys and install it:
sudo apt-add-repository ppa:brightbox/ruby-ng; sudo apt-get update sudo apt-get install ruby2.3 ruby2.3-dev ruby-switch
ruby-switch you can have multiple ruby versions installed and select one of them as default.
Now we have to install required gems. I don’t want to create chaos of ruby gems installed from debian packages and manually, so I prefer to keep all required gems in
gem install github-pages --user-install --no-rdoc --no-ri
Now you can run jekyll with github-pages support. It may be convenient to create separate script for this and put it into root of your github pages repository:
#!/bin/bash export PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH" jekyll serve -w
To update your setup to latest github-pages version, you can just do
gem update github-pages --user-install --no-rdoc --no-ri