active_admin.js loaded twice #20

exviva opened this Issue Jan 7, 2013 · 8 comments


None yet

4 participants

exviva commented Jan 7, 2013

Because lib/active_admin/editor/engine.rb calls ActiveAdmin.setup, which calls Application#register_default_assets, which unconditionally registers active_admin.js, I'm getting active_admin.js loaded twice on my page (first time it's registered in config/initializers/active_admin.rb).

I'm not sure if I should escalate it upstream to active admin, or if active admin editor should deal with it.

I'd be glad to provide a patch, if you have any suggestions @ejholmes .

Thanks for a great gem!

ejholmes commented Jan 7, 2013

Odd, I would consider that a bug in active_admin itself (I think I ran across this before too). Maybe explicitly calling ActiveAdmin.application.register_x in the initializer would work better.

Thanks for the report!

@ejholmes ejholmes added a commit that closed this issue Jan 7, 2013
@ejholmes Fixes #20. a4a7bc4
@ejholmes ejholmes closed this in a4a7bc4 Jan 7, 2013
ejholmes commented Jan 7, 2013

This should be fixed in the latest version (1.0.5).

exviva commented Jan 7, 2013

Wow, insane speed! Thanks!

ejholmes commented Jan 7, 2013


i've updated gem to version 1.0.5 , and the problem still exists.. :(

EJ can You help?


@freezepl Did you upgrade from a 0.3.x version? Make sure you aren't including 'active_admin/editor' in your app/assets/javascripts/active_admin.js file. I should probably write an upgrade guide for 0.3.x -> 1.0.x ...

@ejholmes ejholmes reopened this Jan 14, 2013
jmajonis commented Feb 7, 2013

I was having this problem with 1.0.5, having upgraded from a previous version of this gem. Removing 'active_admin/editor' from app/assets/javascripts/active_admin.js worked for me.

ejholmes commented Feb 7, 2013

Thanks for confirming. Closing this.

@ejholmes ejholmes closed this Feb 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment