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

  • SEARCH
  • Home
  • 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 7007603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:37:43+00:00 2026-05-27T21:37:43+00:00

I’m working more on my first live Rails app using 3.1.0 with M. Hartl’s

  • 0

I’m working more on my first live Rails app using 3.1.0 with M. Hartl’s guide and Postgres. I’ve moved onto Chap 10 in working in the authentication. Instead of pages, I’m using openings. Apart from that, I’m following his users, sessions, from chap 6 on. When I go to the users/index.html.erb I’m getting the following error:

PGError: ERROR: operator does not exist: character varying = integer
LINE 1: …CT “users”.* FROM “users” WHERE “users”.”email” = 8 LIMIT

Reading up on similar strings on stackoverflow, the consensus seems to be that the id field is not set to integer. I can confirm it is integer. If I was to regenerate this field, it would seem to me that this field was created by rails when I generated the model. Since that would be true, should I regenerate an id field in an early migration that would be automatically generated by Rails? I seem to read somewhere that’s a bad idea.

But I don’t think that’s my problem. Looking at the error makes me think that it’s looking for a user’s email that is “8” and not something like ‘joe@example.com’. If that’s true, then I’ve got a mismatch between the expected id field and the email field. That would be expected, but how do I find/understand my mismatch? Because this is due to my inexperience, I started looking at my backtrace to see if I can find what’s different. I’m cheating by looking at gabebw’s copy on github and not finding anything different apart from the later chapters in his code.

How should I learn what to do? I struggle between the difference between @user, @users, users, user in code. I understand its due to the context of how it’s used and that a variable should match up to its relationship in view, helper, controller, model. How did you learn it? If someone is willing my troubled push is up on my github/sam452/vitae in the authenticate1 branch. thx, sam452.

  • 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-05-27T21:37:44+00:00Added an answer on May 27, 2026 at 9:37 pm

    It appears that it is not the varchar, after I reset and migrated the database. So looking at the authenticate methods, I found the user model was calling for the email field, when it should be the id. So the theory that the mismatch between email and the id fields was correct. Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.