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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:15:00+00:00 2026-05-28T01:15:00+00:00

I added a table to my local env called schools and it works fine

  • 0

I added a table to my local env called schools and it works fine in dev. In fact it even works fine in staging (heroku) but fails big time in production and rake db:migrate throws the error bellow.

I cannot even precompile assest (with RAILS_ENV=production), access any part of my application including the rails console in production(heroku). Everything is throwing the error bellow. I have lost several hours on this but do not feel any closer to figuring it our. (Note: I have '"..."' on the reference to the table_name which I think is part of the problem)

I went from rails 3.1.0 to 3.1.3 so that might have something to do with it.

PGError: ERROR:  relation "schools" does not exist

LINE 4:              WHERE a.attrelid = '"schools"'::regclass
                                        ^
:             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = '"schools"'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum

I am as lost as can be on this. I read several other questions on this topic here but no solution at sight. Thank you for your help.
Any insight is greatly appreciated.

UPDATE——————————————————

I just created a brand new app on heroku and ran rake db:migrate and got the same error.

UPDATE 2

I cloned the app from heroku and “schools” is in the schema.

create_table "schools", :force => true do |t|
  ...
  ...
end

UPDATE 3

Tried reverting back to rails 3.1.0 but that did not help.

UPDATE 4

Still working on this. Have not heard from heroku support yet.

UPDATE 5

Heroku support was able to check that ‘schools’ is not a table in the DB but I still cannot access the console and app still down.

  • 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-28T01:15:00+00:00Added an answer on May 28, 2026 at 1:15 am

    Heroku Support helped me solve this even though it was not necessarily heroku’s platform related issue as we found out.

    I was having a chicken-and-egg issue, where the migration wouldn’t run because the rails bootstrap was trying to talk to the table and the table was not created because migration could not run. ActiveAdmin was initializing when rails boots, and was trying to look up schools. Thank you everyone that helped.

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

Sidebar

Related Questions

Location added to table. But missing latitude/longitude. So no marker added to the map.
I'm defining a simple stored function which works fine in my local testing database,
I have been able to set up OBDC in Filemaker, and added table ,
I have added following table dynamically using Javascript: <table class=ActionMenu> <tr> <td> <p>Ghanshyam</p> </td>
I'm starting an ASP.NET MVC project using SubSonic 3 ActiveRecord. I added a table
I am building an app using storyboard. I have added a table view to
I created a table then added a foreign key reference to its primary key
I have a small app that periodically needs a table row added to the
I want to add values to a new column I added to a table.
The contents of the following div is derived dynamically: i.e a table is added

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.