Skip to content

Instantly share code, notes, and snippets.

@edap
Last active July 23, 2016 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edap/f6b86633f2c1a4d1e240b843317dbdb6 to your computer and use it in GitHub Desktop.
Save edap/f6b86633f2c1a4d1e240b843317dbdb6 to your computer and use it in GitHub Desktop.

install this: https://github.com/parkr/ruby-build-github

And then install the ruby version 2.1.7 rbenv install 2.1.7-github

go in the folder of your website. Run:

rbenv local 2.1.7-github

This will set the ruby version of your project to 2.1.7.

then:

gem install bundle

After this, make a Gemfile like this

source 'https://rubygems.org'

require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)
gem 'activesupport', '4.2.7'
gem 'github-pages', versions['github-pages'], group: :jekyll_plugins

Note, 'activesupport' has to be declared before 'github-pages' run bundle install.

You should now be able to build your website using bundle exec jekyll build

and to run it locally with jekyll serve

If, when pushing to github the build fails, test it locally first: bundle exec jekyll build --verbose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment