-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model caching in development mode #835
Comments
I have the same problem, is there a way of configuring ActiveAdmin to remove Model caching ? |
Same problem here. Using |
Any solution for that? |
same issue , app/models are not being reloaded osx 10.6.8 |
inspired by #707, add below to /config/initializers/active_admin.rb for a quick fix:
|
The above workaround does not work on rails-3.2 and activeadmin-fb515af |
So, do you have an other solution? Thanks |
I'm close to a deadline, so I can't investigate this further at the moment. It's bitter, but restarting the server does the trick of course. |
Ok, i understand :) Good luck ! |
Same problem here on Rails 3.1 |
Same here! |
This solution worked for me: #931 (comment) |
Thanks Rainchen this works for me! |
Fixed by #931 |
This issue still there, mac os x 10.6.6i, rails 3.2, activeadmin latest version installed from gihub |
Having this myself, have to restart rails to get any changes to take effect for active admin namespaced controllers. |
@LucisFerre this is about model reloading; see #697 for info on the controller side of things. |
I have the follwing setup
admin/members.rb
config/envronments/develop.rb
http://localhost:3000/admin/members/303
But when I deployed to my unbuntu 12.0.4 server http://*****/admin/members/303
This happens on all the models setup in admin/folder. Ok, so I found this issue/thread and so... on my pc changed: config/envronments/develop.rb
and running this time produced the same error
As I didnt want to change config.cache_classe in my staging (and production) configs I just added a show block for my activeadmin file to make sure there was a block. admin/members.rb
Hope this data sheds more light on the issue. CC @leomao10 |
@themi can you post a Rails app to GitHub that reproduces this problem? |
@daxter just acknowledging your comm so yo don't think i am ignoring you. I started a new, simple app for this example and it all worked nicely! Hmm, it must be one or more of the other features that have been added to the original project - when I have found the combo that produces this anomaly I will post it here. (work on it tonight, will have a post for you within next 24hrs) |
No worries :) |
Here is the demo app https://github.com/themi/demo It was the clockwork gem that is clashing. CC @tomykaira |
It should work in this way if Rails.env == "development" activeadmin_reloader = ActiveSupport::FileUpdateChecker.new(Dir["app/models/**/*"]) do ActiveAdmin.application.unload! Rails.application.reload_routes! end ActionDispatch::Callbacks.to_prepare do activeadmin_reloader.execute_if_updated end end |
I am using edge activeadmin
I have
config.cache_classes = false
and no problems in regular application, but in ActiveAdmin my models are caching, specifically when I change instance methods, they do not get updated on a page refresh (works in other parts of the app)The text was updated successfully, but these errors were encountered: