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

Support for Mongoid 7 & Rails 6? #6

Open
kcore opened this issue May 10, 2020 · 6 comments
Open

Support for Mongoid 7 & Rails 6? #6

kcore opened this issue May 10, 2020 · 6 comments

Comments

@kcore
Copy link

kcore commented May 10, 2020

Hi seems like this is breaking for mongoid 7 in rails 6. Are we going to support it anytime soon?

@dblock
Copy link
Collaborator

dblock commented May 10, 2020

Want to PR?

@kcore
Copy link
Author

kcore commented May 11, 2020

seems like all we need to point it to master branch of rails_observer (as mentioned in the user guid) without which it is failing. My bad in assuming that it would've been fixed in the last year..

@kcore kcore closed this as completed May 11, 2020
@dblock
Copy link
Collaborator

dblock commented May 11, 2020

Someone should go and help with rails/rails-observers#53.

@kcore kcore reopened this May 13, 2020
@kcore
Copy link
Author

kcore commented May 13, 2020

well, seems like mongoid-observers isn't playing nice with rspec. dev environment is loading just fine and observers are firing as well, but when I try running my specs (via rspec) it just lights up failing at config.mongoid.observers = :*******
Error thrown is -

NoMethodError:
  undefined method `mongoid' for #<Rails::Application::Configuration:0x00007ff5b91a4440>
  Did you mean?  mongoize

Any idea how can I fix this? I can raise a PR as well if you direct me

@kcore
Copy link
Author

kcore commented May 13, 2020

@dblock looks like rails/rails-observers#53 is already closed. I don't know much about the gem, but anything I can do to help?

@kcore
Copy link
Author

kcore commented May 13, 2020

looks like including require "mongoid/railtie" in the config/application.rb works and spec loads it up correctly. Should this not be happening and am I majorly missing something?

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

No branches or pull requests

2 participants