ruby on rails - devise forgot password not working -


i using devise authentication on rails 3. signin, signout, signup working fine nothing happens in case of forgot password. when click on forgot password link takes me http://localhost:3000/users/password/new link , there form asking email address , send me reset password instructions button, when click on button takes me http://localhost:3000/users/sign_in dont receive mail regarding reset password.

on console can see following :

sent mail nikitasalunkhe.3@gmail.com (968ms) date: tue, 05 jun 2012 13:14:22 +0530 from: please-change-me-at-config-initializers-devise@example.com reply-to: please-change-me-at-config-initializers-devise@example.com to: nikitasalunkhe.3@gmail.com message-id: <4fcdb8d6de776_dd624e71f0a78a7@user-g41mt-s2.mail> subject: reset password instructions mime-version: 1.0 content-type: text/html;  charset=utf-8 content-transfer-encoding: 7bit  <p>hello nikitasalunkhe.3@gmail.com!</p>  <p>someone has requested link change password, , can through link below.</p>  <p><a href="http://localhost:3000/users/password/edit?reset_password_token=gub8l9nwnikjvjpnhbdw">change password</a></p>  <p>if didn't request this, please ignore email.</p> <p>your password won't change until access link above , create new one.</p> 

but see no mail in inbox.

following code of config/initializer/devise.rb file :

devise.setup |config|  config.mailer_sender = "nikitasalunkhe.3@gmail.com"   config.mailer = "devise::mailer"  require 'devise/orm/active_record'  config.case_insensitive_keys = [ :email ]  config.stretches = 10  config.use_salt_as_remember_token = true  config.reset_password_keys = [ :email ]  

this development.rb file code :

alumnicell::application.configure   # settings specified here take precedence on in config/application.rb    # in development environment application's code reloaded on   # every request.  slows down response time perfect development   # since don't have restart webserver when make code changes.   config.cache_classes = false    # log error messages when accidentally call methods on nil.   config.whiny_nils = true    # show full error reports , disable caching   config.consider_all_requests_local       = true   config.action_view.debug_rjs             = true   config.action_controller.perform_caching = false    # don't care if mailer can't send   config.action_mailer.raise_delivery_errors = false    # print deprecation notices rails logger   config.active_support.deprecation = :log    # use best-standards-support built browsers   config.action_dispatch.best_standards_support = :builtin     config.action_mailer.default_url_options = { :host => 'localhost:3000' } end 

what changes should make working?

do have local mailer daemon installed? best solution use gmail smtp (use settings):

in config/environments/development.rb :

  config.action_mailer.delivery_method = :smtp   config.action_mailer.smtp_settings = {   :address              => "smtp.gmail.com",   :port                 => 587,   :domain               => 'mondomaine.com',   :user_name            => 'smtp@mondomaine.com',   :password             => 'mypassword',   :authentication       => 'plain',   :enable_starttls_auto => true  } 

and delete line :

config.action_mailer.default_url_options = { :host => 'localhost:3000' } 

in production mode, have local mailer server postfix.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -