Skip to content

Error on export with Administrate 0.12.0 #30

Closed

Description

@airjoshb

After setting up, I tried to export and got
NoMethodError: undefined method association_includes' for #PackageDashboard:0x00007f7fd3f67f98`

In searching, I found this reference in Administrate from October

thoughtbot/administrate@8d86f9f

Is it possible that there is a plugin related issue, or is there something else going on? My setup is pretty simple with the route and controller reference on a single model in Administrate.

Thanks for your time.

Activity

  1. andreibondarev commented on Dec 16, 2020

    @andreibondarev
    Member

    @airjoshb Would you please paste the full error stack?

  2. airjoshb commented on Dec 16, 2020

    @airjoshb
    Author

    @andreibondarev Here is the stack

    NoMethodError: undefined method association_includes' for #PackageDashboard:0x00007f7fd3f67f98
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/administrate_exportable-0.1.0/lib/administrate_exportable/exporter_service.rb:84:in collection' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/administrate_exportable-0.1.0/lib/administrate_exportable/exporter_service.rb:19:in block in csv'
    from /Users/josh/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/csv.rb:1183:in generate' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/administrate_exportable-0.1.0/lib/administrate_exportable/exporter_service.rb:15:in csv'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/administrate_exportable-0.1.0/lib/administrate_exportable/exporter_service.rb:6:in csv' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/administrate_exportable-0.1.0/lib/administrate_exportable/exporter.rb:12:in block in exportable'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal/implicit_render.rb:4:in send_action' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:198:in process_action'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:10:in process_action' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:20:in block in process_action'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in block (2 levels) in compile'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in run_callbacks'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in _run_process_action_callbacks' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in run_callbacks'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:19:in process_action' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal/rescue.rb:29:in process_action'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:32:in block in process_action' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in block in instrument'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in instrument' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in instrument'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:30:in process_action' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal/params_wrapper.rb:250:in process_action'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activerecord-4.2.8/lib/active_record/railties/controller_runtime.rb:18:in process_action' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:137:in process'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionview-4.2.8/lib/action_view/rendering.rb:30:in process' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal.rb:196:in dispatch'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal/rack_delegation.rb:13:in dispatch' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_controller/metal.rb:237:in block in action'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:74:in dispatch' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:43:in serve'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:43:in block in serve' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in each'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in serve' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:817:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in call!'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/rack/agent_hooks.rb:30:in traced_call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/rack/browser_monitoring.rb:33:in traced_call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/warden-1.2.7/lib/warden/manager.rb:36:in block in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/warden-1.2.7/lib/warden/manager.rb:35:in catch'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/warden-1.2.7/lib/warden/manager.rb:35:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/etag.rb:24:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/conditionalget.rb:25:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/head.rb:13:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/params_parser.rb:27:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/flash.rb:260:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/session/abstract/id.rb:252:in context' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/session/abstract/id.rb:247:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/cookies.rb:560:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activerecord-4.2.8/lib/active_record/query_cache.rb:36:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activerecord-4.2.8/lib/active_record/migration.rb:377:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:29:in block in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in __run_callbacks__' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in _run_call_callbacks'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/reloader.rb:73:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/remote_ip.rb:78:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/web-console-2.3.0/lib/web_console/middleware.rb:28:in block in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/web-console-2.3.0/lib/web_console/middleware.rb:18:in catch' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/web-console-2.3.0/lib/web_console/middleware.rb:18:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/railties-4.2.8/lib/rails/rack/logger.rb:38:in call_app'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in block in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in block in tagged'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:26:in tagged' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in tagged'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/request_id.rb:21:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/methodoverride.rb:22:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/runtime.rb:18:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/activesupport-4.2.8/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/lock.rb:17:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/actionpack-4.2.8/lib/action_dispatch/middleware/static.rb:120:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/sendfile.rb:113:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/railties-4.2.8/lib/rails/engine.rb:518:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/railties-4.2.8/lib/rails/application.rb:165:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/newrelic_rpm-6.14.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/lock.rb:17:in call'
    from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/content_length.rb:15:in call' from /Users/josh/.rvm/gems/ruby-2.4.2@notpie3/gems/rack-1.6.13/lib/rack/handler/webrick.rb:88:in service'
    from /Users/josh/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/webrick/httpserver.rb:140:in service' from /Users/josh/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/webrick/httpserver.rb:96:in run'
    from /Users/josh/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/webrick/server.rb:290:in block in start_thread'

  3. andreibondarev commented on Dec 16, 2020

    @andreibondarev
    Member

    @airjoshb I'm tied up right now with other work commitments and likely won't be able to look at this until early next year. Feel free to submit a PR if you need this fixed sooner! Thanks.

  4. airjoshb commented on Dec 16, 2020

    @airjoshb
    Author

    @andreibondarev thanks. I downgraded to 0.11.0 and it works from there. Quick question, is there a way to limit/control the number of records that gets exported?

  5. andreibondarev commented on Mar 12, 2021

    @andreibondarev
    Member

    @airjoshb No, no way to currently specify the number of records to export.

  6. andreibondarev commented on Oct 21, 2026

    @andreibondarev
    Member

    This is addressed in #59 and will close automatically when it's merged.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions