I was using ActiveAdmin and while it did work it was a pain to set up and it began mangling JSONB fields in Postgres.
So, I installed Rails Admin and it was awesome!
Until…I pushed to Heroku.
Here’s a screen shot of my apps activity: Rails Admin Eats Ram On Heroku - Imgur
It’s pretty obvious when Rails Admin was installed and accessed.
What’s amazing is if Rails Admin was installed but not accessed everything was fine (see small dip in ram/swap usage).
I removed most of the models that I thought could be causing n+1 queries but nothing worked…so for now I don’t have an admin panel for my app.
So my question is - how do I use Rails Admin and avoid the insane memory usage?
Any help would be appreciated.
Have been working on a lean admin panel type gem that you might find useful – would like to get your feedback. This does work along with RailsAdmin (although it can be stand-alone as well).
When it sees RailsAdmin present, it enables any auto-created models it builds to immediately work in that environment. So with no model files or anything whatsoever you can drop in The Brick and everything jumps to life. I guess a quick video overview of this could be useful. This demo starts with a rails new, so completely from scratch, having only an existing Postgres database:
The core steps shown here – after dropping RailsAdmin and The Brick into your Gemfile and bundling then do a
bin/rails g brick:install to create an initializer file, and then in that initializer (brick.rb) go to the top and uncomment and set this line – should be something different than what you’re currently using for RailsAdmin:
::Brick.path_prefix = 'brick_admin'
Then you can compare the RailsAdmin page against the Brick admin page. With the above, path to the Brick version for employees would be http://localhost:3000/brick_admin/employees.
This gem has been out for 11 months and is going through pretty rapid iteration. Hopefully you find it useful, and if you run into any issues then I’m eager to address them quickly. Number one goal of this thing is to have it be lean and mean, and a close second is that it can be versatile enough to be useful.