NoBrainerORM / nobrainer

Ruby ORM for RethinkDB
http://nobrainer.io/
Other
387 stars 49 forks source link

Not working with activesupport - 6.1.0 #271

Closed mahabib closed 3 years ago

mahabib commented 3 years ago

After the bundle update I started getting this error because of the new version of the activesupport.

_TypeError: module attributes should be defined directly on class, not singleton gems/activesupport-6.1.0/lib/active_support/core_ext/module/attribute_accessors.rb:52:in mattr_reader gems/activesupport-6.1.0/lib/active_support/core_ext/module/attribute_accessors.rb:202:in mattr_accessor gems/nobrainer-0.34.0/lib/nobrainer/document/types.rb:114:in `singleton class' ...

I have changed the Gemfile with the activemodel <= 6.1.0 and it's working fine.

eilers commented 3 years ago

Same problem here. Nobrainer does not work with Rails 6.1.0 (using the current master branch rev eb14483d7fb2570a177b3d170a4aa89fec0b69e6 ). After step back to Rails 6.0.3.4 everything worked again.

zedtux commented 3 years ago

The origin of this issue is this PR.

zedtux commented 3 years ago

Hey guys,

Thank you for reporting this issue, I made a fix which seem to pass on the CI. I will give it a try on one of my projects tomorrow and release a new version of nobrainer if all works well.

zedtux commented 3 years ago

I tried my fix in a project and I was able to upgrade to Rails 6.1 without any errors.

Can you please give it a try guys and confirm it works using gem 'nobrainer', '~> 0.34', github: 'nviennot/nobrainer'?

gencer commented 3 years ago

Works for me! Thanks! ❤

--

Rails 6.1.3

zedtux commented 3 years ago

Great news, thank you @gencer for confirming ! I will release a new version.