prey / gdpr_rails

Rails Engine for the GDPR compliance
https://preyproject.com
MIT License
626 stars 62 forks source link

undefined method `has_one_attached' for User #31

Closed btrd closed 5 years ago

btrd commented 5 years ago

I use ActiveStorage with my Rails app and when I launch my server I get this error :

undefined method `has_one_attached' for User (call 'User.connection' to establish a connection):Class (NoMethodError)

I think it's the same issue that this gem has https://github.com/epfl-exts/rails-gdpr-export/issues/1

michelson commented 5 years ago

Can you paste the backtrace of the error? This library does not use activeStorage

michelson commented 5 years ago

Hi @btrd , could you solve or found the cause of the problem?

mrsweaters commented 5 years ago

@btrd What was your solution? I have the same problem.

These lines are loading the User class too soon: https://github.com/prey/gdpr_rails/blob/master/lib/policy_manager/config.rb#L24-L25

btrd commented 5 years ago

@mrsweaters My solution was to not use this gem 😅 not a solution, sorry