pages-gem: Incompatibility with Ruby 2.4.0

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

What did you do (e.g., steps to reproduce)

Ruby version 2.4.0

Gemfile:

source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

bundle install

What did you expect to happen?

Gems should be installed

What happened instead?

An error occurred while installing json (1.8.3), and Bundler cannot
continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.

Additional information

  • Link to the live site (if applicable):
  • Link to the source repo (if applicable):

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 9
  • Comments: 20 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hey! Thanks for reporting this issue. I hit this last night myself. The issue appears to be that the json gem won’t compile on Ruby 2.4. https://github.com/flori/json/issues/303

I will try to take a look this week. It appears upgrading from json 1.x to json 2.x would solve the issue. We can see what exactly is depending on this gem and pass along the request to update and update it here as well.

Using rbenv with ruby 2.3.1 works on macOS 10.12.2:

Install rbenv first with Homebrew:

brew install rbenv

Now modify your ~/.bash_profile:

export PATH=~/.rbenv/shims:$PATH
eval "$(rbenv init -)"

Finally, install ruby 2.3.1 and the github-pages gem:

rbenv install 2.3.1
rbenv versions
rbenv global 2.3.1
rbenv rehash
gem install bundler
gem install github-pages

@julou I recommend you use rbenv with Ruby 2.3.x and github-pages gem.

There’s additional instructions in their repo.

I’m able to run bundle install with Ruby 2.4.1 locally without any modifications to this repository. Can anyone confirm?

Note that you can brew install rbenv, it will give you suggestions on how to set it up for your shell. 😄