title: Rails 5 - PG::UndefinedTable: ERROR: relation "application_records" does not exist
body: <p>I'm trying to set up a <strong>new</strong> Rails 5 application (ruby 2.3.1, rails 5.0.0.rc1) with postgresql, devise gems and it is failing to run <code>rails db:seed</code> due to following error:</p>
  
  <pre><code>PG::UndefinedTable: ERROR:  relation "application_records" does not exist
  LINE 8:                WHERE a.attrelid = '"application_records"'::r...
                                            ^
  /Users//.rvm/gems/ruby-2.3.1@rails5.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql/database_statements.rb:88:in `async_exec'
  /Users/foo/.rvm/gems/ruby-2.3.1@rails5.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql/database_statements.rb:88:in `block in query'
  /Users/foo/.rvm/gems/ruby-2.3.1@rails5.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract_adapter.rb:566:in `block in log'
  /Users/foo/.rvm/gems/ruby-2.3.1@rails5.0/gems/activesupport-5.0.0.rc1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
  /Users/foo/.rvm/gems/ruby-2.3.1@rails5.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract_adapter.rb:560:in `log'
  /Users/foo/.rvm/gems/ruby-2.3.1@rails5.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql/database_statements.rb:87:in `query'
  /Users/foo/.rvm/gems/ruby-2.3.1@rails5.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:739:in `column_definitions'
  /Users/foo/.rvm/gems/ruby-2.3.1@rails5.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:227:in `columns' 
  </code></pre>
  
  <p>After much googling, I've realized that this has something to do with the <a href="http://blog.bigbinary.com/2015/12/28/application-record-in-rails-5.html" rel="noreferrer">ApplicationRecord base class change in rails 5</a>. Clearly there's no table called <code>application_records</code> and so active_support shouldn't be looking for it. I have already checked that <code>app/models/application_record.rb</code> exists and has the right content. Also, the User model (which is the only model in my app currently) extends ApplicationRecord as expected:</p>
  
  <pre><code>class User &lt; ApplicationRecord
    # Include default devise modules. Others available are:
    # :confirmable, :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, 
           :recoverable, :rememberable, :trackable, :validatable
  end
  </code></pre>
  
  <p><code>rails db: migrate</code> runs fine, but <code>rails db:seed</code> chokes with the above error.</p>
  
  <p>Can anyone shed some light on what might be causing this? </p>
  
  <p>Contents of <code>application_record.rb</code>:</p>
  
  <pre><code>class ApplicationRecord &lt; ActiveRecord::Base
    self.abstract_class = true
  end
  </code></pre>