This is an odd error I encountered, and I've resolved it, but wanted to document it. It's probably low-priority until such time as new deploys start occurring.
Having created an initial admin user with the rake task, I tried to log in to the Heroku deploy as that user. Examining the logs, I had a 503 error with a NoMethodError for valid_password? (on the instance object of User).
I was able to fix this by setting validate_password_field to true in the acts_as_authentic call in User:
...
22 class User < ActiveRecord::Base
23 acts_as_authentic do |c|
24 c.require_password_confirmation = false
25 c.validate_password_field = false # current code base has this false; I set to true
26 c.disable_perishable_token_maintenance = true
27 end
...
So then I was able to log in successfully as the admin user.
Here are the two weird things:
A. I reverted validate_password_field back to false, and the Heroku deploy is still working (e.g., I can log in as admin without the 503).
B. This problem did not occur on my local development machine -- only on Heroku.
Plan to Test/Fix
Replicate the error on another clean Heroku deploy
Attempt to replicate the error with a patched code base on a clean Heroku deploy (e.g., setting validate_password_field to true)
Error Description
This is an odd error I encountered, and I've resolved it, but wanted to document it. It's probably low-priority until such time as new deploys start occurring.
First, I followed the Heroku deploy instructions current as of today (Permalink: https://github.com/dobtco/procure-io/blob/66aaf97af814935c18d1b41faac9505e7a17c279/README.md ).
Having created an initial admin user with the rake task, I tried to log in to the Heroku deploy as that user. Examining the logs, I had a 503 error with a NoMethodError for valid_password? (on the instance object of User).
I was able to fix this by setting validate_password_field to true in the acts_as_authentic call in User:
So then I was able to log in successfully as the admin user.
Here are the two weird things:
A. I reverted validate_password_field back to false, and the Heroku deploy is still working (e.g., I can log in as admin without the 503).
B. This problem did not occur on my local development machine -- only on Heroku.
Plan to Test/Fix