Activeadmin not working
that I can do to solve this problem, entering / admin
Processing by Admin::DashboardController#index as HTML
User Load (1.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
(47.8ms)
SELECT M.action_year, M.action_month, COUNT(M.user_id) active_users
FROM (
SELECT DISTINCT user_id, extract(year from created_at) action_year, extract(month from created_at) action_month FROM comments
UNION
SELECT DISTINCT user_id, extract(year from created_at) action_year, extract(month from created_at) action_month FROM votes
) AS M
GROUP BY
M.action_year,
M.action_month
ORDER BY
M.action_year DESC,
M.action_month DESC
Rendered /usr/local/rvm/gems/ruby-2.1.5/bundler/gems/activeadmin-f51d96dddb5e/app/views/active_admin/page/index.html.arb (7937.1ms)
Completed 500 Internal Server Error in 8039ms
** [Airbrake] Notice was not sent due to configuration:
Environment Monitored? false
API key set? false
ActionView::Template::Error (undefined method []' for nil:NilClass):
print_active_users'
1: insert_tag active_admin_application.view_factory["page"]
app/admin/dashboard.rb:39:in
app/admin/dashboard.rb:68:in block (6 levels) in '
block (5 levels) in '
app/admin/dashboard.rb:68:in
app/admin/dashboard.rb:67:in block (4 levels) in '
block (3 levels) in '
app/admin/dashboard.rb:66:in
app/admin/dashboard.rb:56:in block (2 levels) in '
user_time_zone'
app/controllers/application_controller.rb:97:in
Deleted account Tue 20 Jan 2015 4:25PM
thanks for your answer
the users table contains data, but I see many tables are empty, they can help me with a sample database that contains data
thanks
Richard D. Bartlett Tue 20 Jan 2015 7:34PM
Hey Robert - there is no sample database available at this time. That sounds like a good project for someone to look into!
For now, can you confirm that the /admin page works when you remove line 68 of dashboard.rb?
Deleted account Wed 21 Jan 2015 4:15PM
@richarddbartlett thank you very much, it worked perfectly
Richard D. Bartlett Wed 21 Jan 2015 6:55PM
Great, I hope to fix this properly soon :)
Richard D. Bartlett · Mon 19 Jan 2015 9:25PM
Hey @robertcastro have you created any users? I wonder if this bug is caused by an empty table in the database somewhere. (Sorry to say the admin side of the app is a bit of a shambles.)