I keep getting the error “not authorized” whenever i try to visit:
appname.herokuapp.com/admin_data
I’ve created an admin.rb file with
AdminData.config do |config|
#comment
config.is_allowed_to_view = lambda {|controller| return true if (Rails.env.development? || Rails.env.production?) }
end
(I know the above following has a safety issue but I’m just trying to get it work before I check for administration.)
I’ve tried
bundle exec rake assets:precompile
and also
RAILS_ENV=production rake assets:precompile
prior to pushing to heroku but i can’t seem to get past that error.
I’ve followed the instructions from
https://github.com/bigbinary/admin_data
but can’t seem to get it to work on production.
On my development machine it works.
http://localhost:3000/admin_data shows everything belonging to my dev environment.
Are you certain that your heroku instance is in production mode? Sometimes instances on Heroku are configured as
staging.Try this:
This will return the config variables of your instance. You will see a variety of config variables. Look for these:
Are they set to
productionorstaging?