Open wonderer007 opened 6 years ago
Hi @wonderer007 Thanks for include more info than in https://github.com/rails-api/active_model_serializers/issues/2248
For what it's worth, It still took me a bit to understand the issue. I think what you mean to say is you got an 'invalid json' error when running the benchmarks on the benchmarks branch. 'Invalid JSON document' could mean anything.
I tried Ruby 2.3.3 and didn't reproduce the issue even when I hard-coded the version to be 0.10.3
like yours. Why are you using such an old version instead of the latest, 0.10.7
?
My guess is some other gem you have is different. Try rm -f Gemfile.lock; bundle
Would you share your Gemfile.lock?
What have you tried?
I tried
rm -f Gemfile.lock
bundle
bundle exec ruby benchmark.rb
but result is same
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.6)
actionpack (= 5.1.6)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.6)
actionview (= 5.1.6)
activesupport (= 5.1.6)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.6)
activesupport (= 5.1.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_model_serializers (0.10.7)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.1.6)
activesupport (= 5.1.6)
globalid (>= 0.3.6)
activemodel (5.1.6)
activesupport (= 5.1.6)
activerecord (5.1.6)
activemodel (= 5.1.6)
activesupport (= 5.1.6)
arel (~> 8.0)
activesupport (5.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (8.0.0)
awesome_print (1.8.0)
benchmark-ips (2.7.2)
benchmark-memory (0.1.2)
memory_profiler (~> 0.9)
builder (3.2.3)
byebug (10.0.2)
case_transform (0.2)
activesupport
coderay (1.1.2)
concurrent-ruby (1.0.5)
crass (1.0.3)
erubi (1.7.1)
fast_jsonapi (1.1.1)
activesupport (>= 4.2)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (1.0.0)
concurrent-ruby (~> 1.0)
jsonapi-deserializable (0.2.0)
jsonapi-rb (0.5.0)
jsonapi-deserializable (~> 0.2.0)
jsonapi-serializable (~> 0.3.0)
jsonapi-renderer (0.2.0)
jsonapi-serializable (0.3.0)
jsonapi-renderer (~> 0.2.0)
kalibera (0.1)
memoist (~> 0.11.0)
rbzip2 (~> 0.2.0)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mini_mime (>= 0.1.1)
memoist (0.11.0)
memory_profiler (0.9.10)
method_source (0.9.0)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
nio4r (2.3.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
oj (3.5.0)
oj_mimic_json (1.0.1)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.6.0)
byebug (~> 10.0)
pry (~> 0.10)
rack (2.0.4)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails (5.1.6)
actioncable (= 5.1.6)
actionmailer (= 5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
activemodel (= 5.1.6)
activerecord (= 5.1.6)
activesupport (= 5.1.6)
bundler (>= 1.3.0)
railties (= 5.1.6)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.1.6)
actionpack (= 5.1.6)
activesupport (= 5.1.6)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.1)
rbzip2 (0.2.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
PLATFORMS
ruby
DEPENDENCIES
active_model_serializers
awesome_print
benchmark-ips
benchmark-memory
fast_jsonapi
jsonapi-rb
kalibera
oj
oj_mimic_json
pry-byebug
rails (> 5)
sqlite3
BUNDLED WITH
1.16.1
Any stack trace you can share? I can't really debug it if I can't reproduce it.
Expected behavior vs actual behavior
Expected Behavior
Actual Behavior
Steps to reproduce
Environment
active_model_serializers (0.10.3)
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
OS Type & Version: Ubuntu 16.06