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

Ruby 2.4.0 with RoR 3.2.xx, 4.2.xx bundle install fail #308

Closed
Sega100500 opened this issue Dec 25, 2016 · 6 comments
Closed

Ruby 2.4.0 with RoR 3.2.xx, 4.2.xx bundle install fail #308

Sega100500 opened this issue Dec 25, 2016 · 6 comments

Comments

@Sega100500
Copy link

Error:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/ruby/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator

/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.

@alepore
Copy link
Member

alepore commented Dec 25, 2016

try using gem 'json', github: 'flori/json', branch: 'v1.8'

@Sega100500
Copy link
Author

@alepore
It works. Thanks!
But! Used 1.8.5
Can you publish last version of gem '1.8' - to '1.8.5' ?

@alepore
Copy link
Member

alepore commented Dec 25, 2016

@Sega100500 also, are you aware that the json gem is already included in ruby 1.9.3+?
Try removing the whole dependency, if possible

@Sega100500
Copy link
Author

@alepore
Where dependency?! In Ruby on Rails?!!

@Sega100500
Copy link
Author

Sega100500 commented Dec 25, 2016

@alepore

try using gem 'json', github: 'flori/json', branch: 'v1.8'

It possible for few projects... But I have too many projects on RoR 3.2.xx and 4.2.xx
Edit each Gemfile - it not resolve a problem

@Sega100500
Copy link
Author

Sega100500 commented Dec 25, 2016

@alepore
gem 1.8.3 has an error. In use with Ruby 2.4.0
Please FIX IT.
Or... 1.8.5 must be edge for gem 'json' -v 1.8

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

No branches or pull requests

3 participants