-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Component 'json' of Ruby on Rails not working with Ruby 2.4.0 #27450
Comments
The JSON gem only supports the |
@Drenmi Can still easier to fix this dependence in RoR? |
It looks like this commit fixes it so we only have to wait for the next release. |
@rafaelfranca |
Rails 3.2 is not supported anymore so it may never be released to work with Ruby 2.4. About json gem I don't know. |
How about RoR 4.2.x.x? Any plans for releasing a fix to support Ruby 2.4 ? |
See #27473 for a start on getting 4.2 working with 2.4. |
It's also failing for RoR 5.0.1. |
With Rails 5.0.1 & ruby 2.4.0, when doing |
Solved: I just commented out, in my |
Same issue here with gem 'github-pages', trying to install json.. Solved my issue by downgrading to ruby 2.3 using this :
|
@rickyc try forcing json v2 in Gemfile: |
No dice on forcing json version
|
JSON 1.8.5 is not published to RubyGems. |
It has just been published 👍 |
Version 1.8.3 had an error and was not compiling on macOS. See rails/rails#27450
@VarusSeptimus can you explain why commenting out sdoc does no harm to the project? |
Thanks for the helpful comments. Editing Gemfile.lock and changing json's version from 1.8.3 to 1.8.5 fixed the issue for me. After that I could run I got another error of course, but no longer this one. 😆 |
Install Ruby 2.4.0
In projects with RoR 3.2.xx, 4.2.xxx bundle install is fail:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/ruby/.rbenv/versions/2.4.0/bin/ruby -r ./siteconf20161225-17221-ivjmjg.rb extconf.rb
creating Makefile
current directory: /home/ruby/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean
current directory: /home/ruby/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/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)
} else if (klass == rb_cFixnum) {
^
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)
} else if (klass == rb_cBignum) {
^
generator.c: At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign"
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand"
cc1: warning: unrecognized command line option "-Wno-parentheses-equality"
cc1: warning: unrecognized command line option "-Wno-tautological-compare"
Makefile:241: ошибка выполнения рецепта для цели «generator.o»
make: *** [generator.o] Ошибка 1
make failed, exit code 2
Gem files will remain installed in /home/ruby/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3 for inspection.
Results logged to /home/ruby/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/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'
succeeds before bundling.The text was updated successfully, but these errors were encountered: