Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Ruby 2.4.0 #376

Closed
3 of 4 tasks
sathomas opened this issue Dec 27, 2016 · 20 comments
Closed
3 of 4 tasks

Incompatibility with Ruby 2.4.0 #376

sathomas opened this issue Dec 27, 2016 · 20 comments
Labels

Comments

@sathomas
Copy link

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):
@parkr
Copy link
Contributor

parkr commented Dec 27, 2016

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. ruby/json#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.

@mjsteinbaugh
Copy link

I'm also seeing this on multiple macOS machines. The problem has to do with json 1.8.3 failing to build on ruby 2.4.0p0.

@parkr
Copy link
Contributor

parkr commented Jan 2, 2017

It appears we depend on activesupport which depends on json 1.x. We should see if the Rails team is willing to release a new 4.2.x which bumps the json dependency (or removes it).

@julou
Copy link

julou commented Jan 2, 2017

glad to see it's already on your radar! this makes my first contact with gh-pages rather painful :(

and?… is there any workaround to set up a gh-pages site locally with jekyll on macOS in the meantime?

@DirtyF
Copy link
Contributor

DirtyF commented Jan 2, 2017

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

@nickserv
Copy link

nickserv commented Jan 2, 2017

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

@georgeperez
Copy link
Contributor

There's additional instructions in their repo.

@julou
Copy link

julou commented Jan 3, 2017

awesomely fast! thank you so much.
for others, here's a step-by-step:

  1. install rbenv (using an admin account)
brew install rbenv
  1. install ruby 2.3.1 and corresponding gems (stored in ~/.rbenv)
    NB: do this with the account with which you will use jekyll later (i.e. probably your regular account)
rbenv init
rbenv install 2.3.1
gem install bundler
  1. now in your gh-pages directory
# cd my-gh-pages-site
bundle install

but I can't get rbenv init to add ~/.rbenv/shims to my PATH!?!
Looks like I have to add export PATH=~/.rbenv/shims:$PATH or export RBENV_VERSION=2.3.1 in my .bashrc
Am I missing something obvious?

@DirtyF
Copy link
Contributor

DirtyF commented Jan 3, 2017

@julou
Copy link

julou commented Jan 3, 2017

thx! 👍

@parkr
Copy link
Contributor

parkr commented Jan 3, 2017

It appears they're working on activesupport fixes for Ruby 2.4 here: rails/rails#27473

@parkr parkr added the support label Jan 3, 2017
yasulab added a commit to yasslab/yasslab.jp that referenced this issue Jan 3, 2017
- Ruby 2.4.0 is now being supported in github-pages gem
- See the following issue for details:
- github/pages-gem#376
@mjsteinbaugh
Copy link

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

@bigeagle
Copy link

1/3 a year has passed, but the solution to this issue is still: go back to ruby 2.3

@parkr
Copy link
Contributor

parkr commented Mar 31, 2017

@bigeagle I am able to run Jekyll on 2.4. Can you help provide more details?

@cveneziani
Copy link

The Rails team released a new version of activesupport (v4.2.8). Bumipng this gem should solve the incompatibility with ruby 2.4.

@parkr
Copy link
Contributor

parkr commented Apr 21, 2017

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

@bigeagle
Copy link

It worked, finally.

@parkr
Copy link
Contributor

parkr commented Apr 22, 2017

Great to hear!

@parkr parkr closed this as completed Apr 22, 2017
Starefossen pushed a commit to Starefossen/docker-github-pages that referenced this issue May 11, 2017
@adamralph
Copy link

Still doesn't work for me with Ruby 2.4. I get errors with yajl-ruby v 1.2.1. Apparently, yajl-ruby 1.3.0 needs to be used with Ruby 2.4.

@parkr
Copy link
Contributor

parkr commented Jul 10, 2017

yajl-ruby 1.2.2 works fine with Ruby 2.4. Please bundle update yajl-ruby or run gem install yajl-ruby -v 1.2.2.

@github github locked and limited conversation to collaborators Jul 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

10 participants