Hello,
Specifying the bigdecimal version dependency as ~> 2.0 makes the gem incompatible with rails 4 since it cannot use BigDecimal 2.x version.
Unless you really depend on something in version >= 2.0, I would suggest allowing version 1.x and 2.x with something like:
spec.add_dependency 'bigdecimal', ['>= 1.0', '< 3']
ok, will change
Changing this to use ~> 1 made this update incompatible with my Rails 6.0 with Ruby 2.7.1 API which uses bigdecimal 2 by default. I have to force the project to use bigdecimal 1.4.4 or revert to using oj 3.10.9. I would think it preferable that an older version of the OJ gem support older (5+ year old unsupported versions) of Rails.
Sigh, can't win. Another release coming up.
released
In my Gemfile I have gem 'bigdecimal', '~> 2.0', '>= 2.0.0', then added gem 'oj', '~> 3.10', '>= 3.10.11' and tried running bundle update it's still forcing bigdecimal 1.4.4
Bundler could not find compatible versions for gem "bigdecimal":
In Gemfile:
bigdecimal (~> 2.0, >= 2.0.0)
oj (~> 3.10, >= 3.10.11) was resolved to 3.10.11, which depends on
bigdecimal (~> 1.0, < 3)
If I remove gem 'bigdecimal', '~> 2.0', '>= 2.0.0' from my Gemfile, bundling installs bigdecimal 1.4.4
reverting back to oj 3.10.9
So what actually works, just the ~> 2.0?
Correct. They way oj 3.10.9 is set up, that's what works.
The ~> 1.0 prevents using version 2. I humbly suggest >= 1.0 instead.
released
Installed, ran the test suite, works great! Thanks for responding quickly.
Please comment on #617
Can this b closed?
as https://github.com/ohler55/oj/issues/617 has been closed, I think this can be considered resolved as well.
Most helpful comment
The
~> 1.0prevents using version 2. I humbly suggest>= 1.0instead.