-
Notifications
You must be signed in to change notification settings - Fork 901
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
How to solve has_paper_trail method missing in rails 3.2 #789
Comments
Are you using
Can you provide a complete stack trace for the |
The Trace:
My Gemfile:
|
Are you declaring |
Given that your Gemfile requires PT, here's what I expect to happen:
This is based on my vague understanding of the rails boot process, and could be totally wrong, or could have changed between rails 3 and rails 4. Our next step should be to reproduce this issue in a brand new rails app without rails_admin. If we can do that, then we can fire up a debugger and see if I'm right about the boot process. |
I am having a similar problem with my rails 4.2.6 setup here.
|
I have reproduced this issue in a new rails app: https://github.com/jaredbeck/pt_issue_789 The problem can be reproduced when a custom initializer autoloads an AR model before the |
Closed by #794. Sascha and Duke, please try |
This fix has been released in 5.0.1. |
Thank you @jarebeck I'll try this version soon |
Thank you too, for me it's working with rails 4
|
This issues is how to solve a problem, please create a pull request to fix it or update the documentation.
Using rails 3.2 and paper_trail 5.0.0 I receive the following error:
.../activerecord-3.2.19/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined local variable or method `has_paper_trail' for #<Class:0x007f339a7baaf0> (NameError)
To fix it, create an initiailizer and load the active record framework:
The problem was introducted by 2029ea3 in #725
The text was updated successfully, but these errors were encountered: