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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:59:44+00:00 2026-05-25T20:59:44+00:00

This is in development mode. ActiveRecord::StatementInvalid. This is an example: I have a model

  • 0

This is in development mode. ActiveRecord::StatementInvalid. This is an example: I have a model called DisplayAds. Now activerecord wants to query the table as display_adses instead of display_ads. I have another model called Media. Activerecord use to query the table medias. Now it wants to query a table called medium.
I know that DisplayAds is not the proper naming convention but it was working until now.

I realize I can fix this by putting set_table_name in the model.
I have not upgraded rails and everything has been working fine for months.
I have a live production version of this site and it is not experiencing this problem.
I do git status and I do not see any config files as being modified.

What could I have done to start this happening? How can I stop it?

  • 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-25T20:59:44+00:00Added an answer on May 25, 2026 at 8:59 pm

    Have you recently upgraded from 2.3.5/8 to 3.0.x? I had the same problem (same thing with medias).

    You’ll want to add irregular Inflections in your config/initializers/inflections.rb file

     ActiveSupport::Inflector.inflections do |inflect|
        inflect.irregular 'media', 'medias'
        inflect.irregular 'display_ad', 'display_ads'
        ...
     end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class called Foo that looks like this: class Foo < ActiveRecord::Base
I am new this sharepoint development and i have task in hand to do
I would like to have a nice template for doing this in development. How
I have a separate DB for one model in my application and in development
This is my Action model: class Action < ActiveRecord::Base end class Fold < Action
Hopefully Moishe sees this: in development mode, the channel api client (javascript) resorts to
What is a right way to preload Rails model in development mode? Background: Rails
I mucked around my development environment enough that now I have to restart my
This San Mateo development company makes a freely downloadable convenient packaging of many plugins
Having recently discovered this method of development, I'm finding it a rather nice methodology.

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.