1
votes

I have a fresh app with only a few gems. Devise being one of them of course. And when I make an Admin model via Devise's Option 1 give here

... and upload to heroku, I am unable to run a db:migrate due to the following error:

rake aborted! uninitialized constant Admin /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:230:in block in constantize' /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:ineach' /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in constantize' /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise.rb:256:inget' /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/mapping.rb:77:in to' /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/mapping.rb:72:inmodules' /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/mapping.rb:89:in routes' /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/mapping.rb:156:indefault_used_route'

etc...

Does anyone have any suggestions?

1
Did you ran rails g devise:install or rails g devise install? - waldyr.ar
Yes, everything works locally, and I've run rails g devise:install. - ac360
This is a bit silly, but did you commit your admin.rb file? - Fiona T

1 Answers

0
votes

Created another fresh rails app and everything is working now. I believe the problem might have been that I created my Admin model with a capital "A" and some code was looking for an admin model with a lowercase "a"