Tweaks to get it working under Passenger #108

wants to merge 1 commit into


None yet
3 participants

Hi, I have a proposed set of tweaks to get this working under Passenger, including some documentation changes.

I was getting a persistent error with the confirmation process complaining about a missing reset_password_sent_at field, so I added a spec for it and tweaked the User model slightly.

Finally, I didn't commit this as I'm not sure the right way to do it, but: the most recent migration seems to be redundant if you are setting up from scratch, as the most recent version of Devise includes this field (actually the aforementioned reset_password_sent_at field).

I thought about that migration and I don't know the right way to handle it. Those folks who are upgrading may need it for Devise to function, but it breaks the install process for those of us who set up our own database config (in my case, using Postgres) and migrate with a "from scratch" install. Breaks the tests as well. How to handle?

Dave Della Costa A number of tweaks to enable setup under Passenger in a production (R…
…AILS_ENV) environment. Includes mail configuration for Devise as well as fixing an issue that seemingly prevented the confirmation from working completely (includes tweak to User model and corresponding spec). Also added some documentation to the README to explain a few additional necessary configuration steps for Passenger/Production RAILS_ENV.

Oh, sorry, I just read your contribution guidelines now: I didn't create a branch for this, and it's sort of one big commit rather than many little ones (although it's not that big really). Let me know if you'd like me to rectify any of this and I can re-submit the pull request.

Also, may want to skip db/schema.rb until we have a conversation about db/migrate/20120319114057_add_reset_password_sent_at_to_users.rb and how you think it is best handled.



malclocke commented Apr 25, 2012

Hi Dave,

Did you use rake db:migrate to set up the database? If so, you should use rake db:setup as per the README.

It might be worth going back and modifying the original devise migration so that it does work correctly for anyone who runs db:migrate on set up. I'll add an issue for this.

Do you think you could split this up into separate pull requests? I think you can drop the schema.rb change. Also, I'll fix the copyright dates.

Thanks, and sorry for taking so long to get back to you on this.

@parndt parndt commented on the diff Nov 29, 2012

@@ -35,6 +35,7 @@ def set_random_password_if_blank
def set_reset_password_token
if new_record?
self.reset_password_token = Devise.friendly_token
+ self.reset_password_sent_at =

parndt Nov 29, 2012


This might be better off as:

self.reset_password_sent_at =

What do you think? Does devise handle time zones / UTC already?


malclocke commented Jan 15, 2014

Closing as this is too out of date to merge now.

malclocke closed this Jan 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment