Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Ruby JSON 1.8.3 is incompatible with Ruby version in Ubuntu 18.04 #628

Open
BennyAJ opened this issue Oct 19, 2018 · 0 comments
Open

Ruby JSON 1.8.3 is incompatible with Ruby version in Ubuntu 18.04 #628

BennyAJ opened this issue Oct 19, 2018 · 0 comments

Comments

@BennyAJ
Copy link

BennyAJ commented Oct 19, 2018

Following the install instructions for the Github Pages site gives the following error when running bundle install

current directory:
/tmp/bundler20181019-2015-enjtmcjson-1.8.3/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function);
did you mean ‘mFixnum’?
     } else if (klass == rb_cFixnum) {
                         ^~~~~~~~~~
                         mFixnum
generator.c:861:25: note: each undeclared identifier is reported only once for
each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function);
did you mean ‘rb_cFixnum’?
     } else if (klass == rb_cBignum) {
                         ^~~~~~~~~~
                         rb_cFixnum
Makefile:242: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/tmp/bundler20181019-2015-enjtmcjson-1.8.3/gems/json-1.8.3 for inspection.
Results logged to
/tmp/bundler20181019-2015-enjtmcjson-1.8.3/extensions/x86_64-linux/2.5.0/json-1.8.3/gem_make.out

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

In Gemfile:
  github-pages was resolved to 106, which depends on
    jekyll-mentions was resolved to 1.2.0, which depends on
      html-pipeline was resolved to 2.3.0, which depends on
        activesupport was resolved to 4.2.7, which depends on
          json

It seems that this is caused by a Ruby version mismatch as described in this issue. The Travis build seems to still be passing anyway since it explicitly sets the Ruby version to 2.2.2.

The output of ruby --version after following the setup instructions in the README is

ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

I've been able to get it working by deleting the Gemfile.lock file before running bundle install, but this obviously isn't ideal. Regardless, it doesn't seem like the current instructions are working on Ubuntu 18.04.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant