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

upgrade mongoid 6.0 to support ruby2.4 #7

Merged
merged 2 commits into from
Dec 30, 2016
Merged

upgrade mongoid 6.0 to support ruby2.4 #7

merged 2 commits into from
Dec 30, 2016

Conversation

machu
Copy link
Member

@machu machu commented Dec 29, 2016

ruby2.4.0ではmongoid 5系が動かないので、6系にアップグレードしました。

動かない理由はmongoid5系がjson1.8.3に間接的に依存しており、json1.8.3がruby2.4.0に対応していないためです。 ruby/json#303 によると次のRails 4.2.8で対応するようですが、それをまたずにmongoidを上げてしまおうかと。

$ ebenv local 2.4.0
$ bundle
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
(中略)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/machu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/Users/machu/.rbenv/versions/2.4.0/bin/ruby -r ./siteconf20161229-75425-gs1efs.rb extconf.rb
creating Makefile

current directory: /Users/machu/.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: /Users/machu/.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:861:25: error: use of undeclared identifier 'rb_cFixnum'
    } else if (klass == rb_cFixnum) {
                        ^
generator.c:863:25: error: use of undeclared identifier 'rb_cBignum'
    } else if (klass == rb_cBignum) {
                        ^
2 errors generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/machu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3 for inspection.
Results logged to /Users/machu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-15/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.

@tdtds
Copy link
Member

tdtds commented Dec 30, 2016

これで行ってみましょう。マージします。

@tdtds tdtds merged commit d8d5bf3 into master Dec 30, 2016
@machu machu deleted the support-ruby2.4 branch December 31, 2016 00:53
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

Successfully merging this pull request may close these issues.

2 participants