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 8872561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:14:56+00:00 2026-06-14T18:14:56+00:00

So, this is now the third time I’ve received this error over the course

  • 0

So, this is now the third time I’ve received this error over the course of working on this project I posted a question a few months back regarding this
ActiveRecord::StatementInvalid (PG::Error: ERROR: column does not exist

Heroku Logs

2012-11-19T05:04:20+00:00 app[web.1]: Processing by MainController#home as HTML
2012-11-19T05:04:20+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-11-19T05:04:20+00:00 app[web.1]: 
2012-11-19T05:04:20+00:00 app[web.1]: LINE 1: SELECT "apartments".* FROM "apartments"  WHERE (Bed = 0)
2012-11-19T05:04:20+00:00 app[web.1]:                                                         ^
2012-11-19T05:04:20+00:00 app[web.1]:   app/controllers/main_controller.rb:6:in `home'
2012-11-19T05:04:20+00:00 app[web.1]: : SELECT "apartments".* FROM "apartments"  WHERE (Bed = 0)):
2012-11-19T05:04:20+00:00 app[web.1]: 
2012-11-19T05:04:20+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::Error: ERROR:  column "bed" does not exist

Controller Code

def home
  @apartments = Apartment.all
  @studio = Apartment.where(:Bed => 0).all
  @oneBdr = Apartment.where(:Bed => 1).all
  @twoBdr = Apartment.where(:Bed => 2).all
  @threeBdr = Apartment.where(:Bed => 3).all
  @fourPlusBdr = Apartment.where("Bed >= 4").all
end

Basically, I was able to fix it the first two times by switching from find to where and then the second time from where back to find. I could never make sense why it worked but it did so I wound up forgetting about it until I started getting the error again. Now it whether I swap between where/find searches I still wind up with the same error. Any help would be highly welcomed I’m a bit lost on what the cause of this issue might be.

Thanks in advance!

  • 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-14T18:14:58+00:00Added an answer on June 14, 2026 at 6:14 pm

    Have u created the bed column by one add column migration? if yes try this

    http://blog.blazingcloud.net/2010/12/02/heroku-migration-fails-to-update-attributes-reset_column_information/

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

Sidebar

Related Questions

I'm rather surprised at how few objects implement NSCopying. This is the third time
This is the third time I'm installing zend studio and zend server now these
THIRD EDIT: I now believe that this problem is due to a SOAP version
Third try at fixing this tonight - trying a different approach than before now.
Spent a good few hours on this now and don't seem to be getting
Now this isn't a question as to which of the technologies is better, since
Now this may seem like a silly question, but I need to know how
Every time the program terminates when it runs the third time through this loop:
Now this is going to be a very absurd question. But what can I
I had asked this question a few weeks back on how to preload images

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.