Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:38:01+00:00 2026-06-10T07:38:01+00:00

This one is driving me absolutely crazy. I tested updating user’s email address on

  • 0

This one is driving me absolutely crazy. I tested updating user’s email address on dev and staging environments, and it all worked fine. It updates unconfirmed_email field and sends out a confirmation email address.

However, only in production environment, it fails!

In dev/staging environment, I see the following statements when a user updates his/her email address.

User Load (0.5ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1
Profile Load (0.3ms)  SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = 2 LIMIT 1
(0.1ms)  BEGIN
User Exists (0.6ms)  SELECT 1 FROM "users" WHERE ("users"."email" = 'aaaa@yahoo.com' AND "users"."id" != 2) LIMIT 1
(0.3ms)  UPDATE "users" SET "unconfirmed_email" = 'aaaa@yahoo.com', "updated_at" = '2012-08-27 04:22:10.470329' WHERE "users"."id" = 2
User Load (0.3ms)  SELECT "users".* FROM "users" WHERE "users"."confirmation_token" = 'jUcfXqMqDjeEsJ3TEKws' LIMIT 1
(0.3ms)  UPDATE "users" SET "unconfirmed_email" = 'aaaa@yahoo.com', "updated_at" = '2012-08-27 04:22:10.470329', "confirmation_token" = 'jUcfXqMqDjeEsJ3TEKws', "confirmation_sent_at" = '2012-08-27 04:22:10.473264' WHERE "users"."id" = 2

However, in production, I see the following.

User Load (6.7ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 5 LIMIT 1
Profile Load (2.1ms)  SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = 5 LIMIT 1
 (1.2ms)  BEGIN
User Exists (1.3ms)  SELECT 1 FROM "users" WHERE ("users"."email" = 'aaaa@yahoo.com' AND "users"."id" != 5) LIMIT 1
 (1.2ms)  ROLLBACK

One more odd thing. I could update the email address manually in rails console…..

1.9.3p194 :005 > u.update_attributes(:email => "aaaa@yahoo.com")
(1.3ms)  BEGIN
User Exists (1.4ms)  SELECT 1 FROM "users" WHERE ("users"."email" = 'aaaa@yahoo.com' AND "users"."id" != 1) LIMIT 1
(1.4ms)  UPDATE "users" SET "unconfirmed_email" = 'aaaa@yahoo.com', "updated_at" = '2012-08-27 05:05:26.337961' WHERE "users"."id" = 1
User Load (1.4ms)  SELECT "users".* FROM "users" WHERE "users"."confirmation_token" = 'Yyg98zno81adJt4mp7pG' LIMIT 1
(1.4ms)  UPDATE "users" SET "unconfirmed_email" = 'aaaa@yahoo.com', "updated_at" = '2012-08-27 05:05:26.337961', "confirmation_token" = 'Yyg98zno81adJt4mp7pG', "confirmation_sent_at" = '2012-08-27 05:05:26.342299' WHERE "users"."id" = 1
Profile Load (1.4ms)  SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = 1 LIMIT 1
(1.7ms)  COMMIT
=> true 

Any help would be much appreciated!

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:38:03+00:00Added an answer on June 10, 2026 at 7:38 am

    I was trying to figure out what the differences are between the two environments – dev/staging vs. production. Since staging and production have pretty much identical settings, the only I could think of was cacheing. So, I changed the update_attributes line to the following and it worked.

      if @user.reload.update_attributes(:email => params[:email])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is driving me absolutely crazy. I'm trying to deploy an application to one
This one is driving me crazy. AssemblyDefinition asm1 = AssemblyDefinition.ReadAssembly(example); AssemblyDefinition asm2 = AssemblyDefinition.ReadAssembly(example2);
I've been driving myself crazy over the past few days over this one. We've
This bug is driving me absolutely crazy. I'm trying to filter a number of
This one is driving me absolutely insane, especially because I have a suspicion that
This one has been driving me crazy today. Since upgrading to Grails 1.2 and
This is driving me crazy. I have this one php file on a test
This one is driving me crazy. A FB app we are developing is having
Ok, this is driving me crazy...I have this one liner to find files with
This one is driving me crazy:-) Lets say I have some test xaml code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.