views:

650

answers:

4

Yes, I've read this.

This is what I'm getting in my production.log:

ActionView::TemplateError (undefined method `password' for #<User:0x2b0ddb58cdc0>) on line #11 of app/views/users/new.html.erb:
8:         </p>
9:         <p>
10:           <%= f.label :password, "Password:" %><br />
11:           <%= f.password_field :password %>
12:         </p>
13:         <p>
14:           <%= f.label :password_confirmation, "Password again:" %><br />

When I try:

$ heroku rake db:reset RAILS_ENV=production

I get:

yeqynzfiku already exists
(in /disk1/home/slugs/109616_e6df6f2_8837/mnt)
Couldn't drop yeqynzfiku : #<ActiveRecord::StatementInvalid: PGError: ERROR:  must be owner of database yeqynzfiku
: DROP DATABASE IF EXISTS "yeqynzfiku">

I don't know what this means. I've also tried

$ heroku rake db:reset
$ heroku rake db:migrate RAILS_ENV=production
$ heroku rake db:migrate
$ heroku rake gems:install (for what it's worth)

Everything works fine locally, both in development and production modes. I have a .gems file in my app, and when I first pushed to Heroku it seemed to install AuthLogic and Paperclip just fine.

Stumped. Thanks.

A: 

Ah, had something to do with lots of things in the .gitignore file. Should have cleared it before pushing to Heroku.

+8  A: 

Sounds like you solved it, but with problems like this I find it handy do do a heroku restart.

For example, after running migrations with heroku rake db:migrate the app needs to be restarted before it will see those new columns.

Luke Francl
This was the key when I was having the same issue. Cheers
bjeanes
"heroku restart" is what fixed it for me
Andrew
A: 

Instead of db:reset try db:migrate VERSION=0 and db:migrate.
I think they have issues with reset because it tries to drop the db.
Also, you don't need to put RAILS_ENV=production it's the default AFAIK...

Devenv
BTW authlogic makes troubles in heroku, I had to put version info in .gems first, and after sometime had another issue, so I just installed it as plugin...
Devenv
A: 

I have the same problem, then i do a heroku restart and it works perfect.

christianrojas