Skip to content
This repository has been archived by the owner on Aug 1, 2018. It is now read-only.

Problem with cache_classes = true #53

Open
badosu opened this issue Jun 16, 2014 · 0 comments
Open

Problem with cache_classes = true #53

badosu opened this issue Jun 16, 2014 · 0 comments

Comments

@badosu
Copy link

badosu commented Jun 16, 2014

Deploying to heroku I've seen some problems when this is set to true.

For some reason, formtastic does not reload some classes when it's needed. So I see things like:

NoMethodError: undefined method `editor' for #<ActiveAdmin::Application:0x007f08134ae5f8>
ActionView::Template::Error (Unable to find input class HtmlEditorInput)
/app/config/initializers/active_admin_editor.rb:1:in `<top (required)>': uninitialized constant ActiveAdmin::Editor (NameError)

See: rails/spring#95 for references.

I was able to make a workaround for this error, prepending this to the initializer:

require 'active_admin_editor'
require "#{Gem::Specification.find_by_name("active_admin_editor").gem_dir}/app/inputs/html_editor_input"

This is problem an error more related to Formtastic than to this gem, but this should be useful for someone who has the same problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant