ac360
ac360

Reputation: 211

Uninitialized Constant Admin on Heroku

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?

Upvotes: 1

Views: 492

Answers (1)

ac360
ac360

Reputation: 211

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"

Upvotes: 0

Related Questions