prey / gdpr_rails

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

Issue with paperclip #42

Closed Altons closed 5 years ago

Altons commented 5 years ago

Hi there,

I have followed the instructions as per README and got gdpr_rails working with active_admin. However when I tried to look at the User model inside activeAdmin I get the following error:

Bootsnap::LoadPathCache::FallbackScan at /admin/users

and trace back to an issue with paperclip. Weird thing is, I am using activestorage so I skipped the paperclip instructions.

gdpr_rails (0.5.0) app/models/policy_manager/concerns/active_storage_behavior.rb

# -*- encoding : utf-8 -*-

require "paperclip"

module PolicyManager::Concerns::ActiveStorageBehavior

  extend ActiveSupport::Concern

  included do

I dont think paperclip is required in active_storage_behavior.rb` otherwise I have no idea on how to fix it. Thanks in advance!!!

here is my initializer gdrp.rb

PolicyManager::Config.setup do |c|
  c.admin_user_resource = AdminUser # Active Admin default
  c.logout_url = "/admin/logout"
  c.from_email = "admin@example.com" # Active Admin default
  c.admin_email_inbox = "foo@baaz.org"
  c.paperclip = false
  # Cookie consent
  c.add_rule({name: "cookie", sessionless: true }  )
  # Age confirmation
  c.add_rule({name: "age", validates_on: [:create, :update], blocking: true })
  # Privacy & TOC
  c.add_rule({name: "privacy_terms", validates_on: [:create, :update], blocking: true })

PolicyManager::UserTermsController.send(:include, Devise::Controllers::Helpers)
end

and gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    aasm (5.0.6)
      concurrent-ruby (~> 1.0)
    actioncable (5.2.3)
      actionpack (= 5.2.3)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailer (5.2.3)
      actionpack (= 5.2.3)
      actionview (= 5.2.3)
      activejob (= 5.2.3)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.2.3)
      actionview (= 5.2.3)
      activesupport (= 5.2.3)
      rack (~> 2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.2.3)
      activesupport (= 5.2.3)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activeadmin (2.3.1)
      arbre (~> 1.2, >= 1.2.1)
      formtastic (~> 3.1)
      formtastic_i18n (~> 0.4)
      inherited_resources (~> 1.7)
      jquery-rails (~> 4.2)
      kaminari (~> 1.0, >= 1.0.1)
      railties (>= 5.0, < 6.1)
      ransack (~> 2.1, >= 2.1.1)
      sassc-rails (~> 2.1)
      sprockets (>= 3.0, < 4.1)
      sprockets-es6 (~> 0.9, >= 0.9.2)
    activejob (5.2.3)
      activesupport (= 5.2.3)
      globalid (>= 0.3.6)
    activemodel (5.2.3)
      activesupport (= 5.2.3)
    activerecord (5.2.3)
      activemodel (= 5.2.3)
      activesupport (= 5.2.3)
      arel (>= 9.0)
    activestorage (5.2.3)
      actionpack (= 5.2.3)
      activerecord (= 5.2.3)
      marcel (~> 0.3.1)
    activesupport (5.2.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    arbre (1.2.1)
      activesupport (>= 3.0.0)
    archive-zip (0.12.0)
      io-like (~> 0.3.0)
    arel (9.0.0)
    babel-source (5.8.35)
    babel-transpiler (0.7.0)
      babel-source (>= 4.0, < 6)
      execjs (~> 2.0)
    bcrypt (3.1.13)
    better_errors (2.5.1)
      coderay (>= 1.0.0)
      erubi (>= 1.0.0)
      rack (>= 0.9.0)
    bindex (0.8.1)
    binding_of_caller (0.8.0)
      debug_inspector (>= 0.0.1)
    bootsnap (1.4.5)
      msgpack (~> 1.0)
    builder (3.2.3)
    byebug (11.0.1)
    capybara (3.29.0)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (~> 1.5)
      xpath (~> 3.2)
    chartkick (3.2.1)
    childprocess (2.0.0)
      rake (< 13.0)
    chromedriver-helper (2.1.1)
      archive-zip (~> 0.10)
      nokogiri (~> 1.8)
    coderay (1.1.2)
    coffee-rails (4.2.2)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.1.5)
    crass (1.0.4)
    debug_inspector (0.0.3)
    devise (4.7.1)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0)
      responders
      warden (~> 1.2.3)
    erubi (1.8.0)
    execjs (2.7.0)
    ffi (1.11.1)
    formtastic (3.1.5)
      actionpack (>= 3.2.13)
    formtastic_i18n (0.6.0)
    gdpr_rails (0.5.0)
      aasm
      chartkick (>= 3.2.0)
      groupdate (= 4.0.0)
      rails (>= 5.1.4, <= 6)
      redcarpet
      rubyzip (>= 1.0.0)
      will_paginate
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    groupdate (4.0.0)
      activesupport (>= 4.2)
    has_scope (0.7.2)
      actionpack (>= 4.1)
      activesupport (>= 4.1)
    i18n (1.6.0)
      concurrent-ruby (~> 1.0)
    inherited_resources (1.11.0)
      actionpack (>= 5.0, < 6.1)
      has_scope (~> 0.6)
      railties (>= 5.0, < 6.1)
      responders (>= 2, < 4)
    io-like (0.3.0)
    jbuilder (2.9.1)
      activesupport (>= 4.2.0)
    jquery-rails (4.3.5)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    kaminari (1.1.1)
      activesupport (>= 4.1.0)
      kaminari-actionview (= 1.1.1)
      kaminari-activerecord (= 1.1.1)
      kaminari-core (= 1.1.1)
    kaminari-actionview (1.1.1)
      actionview
      kaminari-core (= 1.1.1)
    kaminari-activerecord (1.1.1)
      activerecord
      kaminari-core (= 1.1.1)
    kaminari-core (1.1.1)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    loofah (2.2.3)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (0.3.3)
      mimemagic (~> 0.3.2)
    method_source (0.9.2)
    mimemagic (0.3.3)
    mini_mime (1.0.2)
    mini_portile2 (2.4.0)
    minitest (5.11.3)
    msgpack (1.3.1)
    nio4r (2.5.1)
    nokogiri (1.10.4)
      mini_portile2 (~> 2.4.0)
    orm_adapter (0.5.0)
    polyamorous (2.3.0)
      activerecord (>= 5.0)
    public_suffix (4.0.1)
    puma (3.12.1)
    rack (2.0.7)
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (5.2.3)
      actioncable (= 5.2.3)
      actionmailer (= 5.2.3)
      actionpack (= 5.2.3)
      actionview (= 5.2.3)
      activejob (= 5.2.3)
      activemodel (= 5.2.3)
      activerecord (= 5.2.3)
      activestorage (= 5.2.3)
      activesupport (= 5.2.3)
      bundler (>= 1.3.0)
      railties (= 5.2.3)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.2.0)
      loofah (~> 2.2, >= 2.2.2)
    railties (5.2.3)
      actionpack (= 5.2.3)
      activesupport (= 5.2.3)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.19.0, < 2.0)
    rake (12.3.3)
    ransack (2.3.0)
      actionpack (>= 5.0)
      activerecord (>= 5.0)
      activesupport (>= 5.0)
      i18n
      polyamorous (= 2.3.0)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.0)
      ffi (~> 1.0)
    redcarpet (3.5.0)
    regexp_parser (1.6.0)
    responders (3.0.0)
      actionpack (>= 5.0)
      railties (>= 5.0)
    ruby_dep (1.5.0)
    rubyzip (1.2.4)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.1.0)
      railties (>= 5.2.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sassc (2.2.0)
      ffi (~> 1.9)
    sassc-rails (2.1.2)
      railties (>= 4.0.0)
      sassc (>= 2.0)
      sprockets (> 3.0)
      sprockets-rails
      tilt
    selenium-webdriver (3.142.4)
      childprocess (>= 0.5, < 3.0)
      rubyzip (~> 1.2, >= 1.2.2)
    spring (2.1.0)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-es6 (0.9.2)
      babel-source (>= 5.8.11)
      babel-transpiler
      sprockets (>= 3.0.0)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sqlite3 (1.4.1)
    thor (0.20.3)
    thread_safe (0.3.6)
    tilt (2.0.9)
    turbolinks (5.2.0)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    uglifier (4.1.20)
      execjs (>= 0.3.0, < 3)
    warden (1.2.8)
      rack (>= 2.0.6)
    web-console (3.7.0)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket-driver (0.7.1)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.4)
    will_paginate (3.1.8)
    xpath (3.2.0)
      nokogiri (~> 1.8)

PLATFORMS
  ruby

DEPENDENCIES
  activeadmin
  better_errors
  binding_of_caller
  bootsnap (>= 1.1.0)
  byebug
  capybara (>= 2.15)
  chromedriver-helper
  coffee-rails (~> 4.2)
  devise
  gdpr_rails
  jbuilder (~> 2.5)
  listen (>= 3.0.5, < 3.2)
  puma (~> 3.11)
  rails (~> 5.2.3)
  sass-rails (~> 5.0)
  selenium-webdriver
  spring
  spring-watcher-listen (~> 2.0.0)
  sqlite3
  turbolinks (~> 5)
  uglifier (>= 1.3.0)
  web-console (>= 3.3.0)

RUBY VERSION
   ruby 2.6.3p62

BUNDLED WITH
   1.17.2
michelson commented 5 years ago

Hi there @Altons , I've made a fix in the active storage behavior, it's passing the CI test could you use the gem from master branch and tell us if it's working for you

thanks!

Altons commented 5 years ago

Hi @michelson, It is working!!! thanks!

any ideas when 0.5.1 will be released?

thanks again

michelson commented 5 years ago

relased as 0.5.1 in rubygems. thanks @Altons for report this!