title: Rails - PG::UndefinedTable: ERROR: relation "customers" does not exist
body: <p>Rails 5.0.4,  Ruby 2.5.1, Postgres, Ubuntu 18.04</p>
  
  <p>I've read several posts here in stackoverflow similar to my problem, but nothing that helps me or is similar to mine.</p>
  
  <p>Back story</p>
  
  <p>I developed a personal app on my laptop.  I pushed to github and heroku and everything works just fine.   I wanted to be able to work on this app on my desktop computer also.  It has the same setup as my laptop: both run Ubuntu 18.04, both have the same versions of ruby and rails, both have postgres.  </p>
  
  <p>I cloned the app from github onto my desktop.  Problem: any rails or rake command I run generates this error.</p>
  
  <pre><code>/home/jdc44/.rvm/gems/ruby-2.5.1/gems/activerecord-5.0.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:88:in `async_exec': PG::UndefinedTable: ERROR:  relation "customers" does not exist
  LINE 8:                WHERE a.attrelid = '"customers"'::regclass
                                            ^
  :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                       pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
               (SELECT c.collname FROM pg_collation c, pg_type t
                 WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation &lt;&gt; t.typcollation),
                       col_description(a.attrelid, a.attnum) AS comment
                  FROM pg_attribute a LEFT JOIN pg_attrdef d
                    ON a.attrelid = d.adrelid AND a.attnum = d.adnum
                 WHERE a.attrelid = '"customers"'::regclass
                   AND a.attnum &gt; 0 AND NOT a.attisdropped
                 ORDER BY a.attnum
   (ActiveRecord::StatementInvalid)
  </code></pre>
  
  <p>Since it states <code>PG::UndefinedTable: ERROR...</code>, I "assumed" it must be a database setup issue.</p>
  
  <p>On my desktop, in postgres, I created the same databases, users and passwords as is on my laptop.</p>
  
  <pre><code>postgres=# \l
                                             List of databases
            Name          |   Owner    | Encoding |   Collate   |    Ctype    |     Access privileges     
  ------------------------+------------+----------+-------------+-------------+---------------------------
   myapp                  | myapp      | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
   myapp_development      | cowan      | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/cowan                +
                          |            |          |             |             | cowan=CTc/cowan          +
                          |            |          |             |             | myapp=CTc/cowan
   myapp_test             | myapp      | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/myapp                +
                          |            |          |             |             | myapp=CTc/myapp
   postgres               | postgres   | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
  
  </code></pre>
  
  <p>With the exception of what is displayed in the <code>Access privileges</code> column, the lines with myapp... are identical to my laptop output.</p>
  
  <p><code>database.yml</code></p>
  
  <pre><code>default: &amp;default
    adapter: postgresql
    encoding: unicode
    # For details on connection pooling, see rails configuration guide
    # http://guides.rubyonrails.org/configuring.html#database-pooling
    pool: &lt;%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %&gt;
    host: localhost
    username: myapp
    password: *****
  
  development:
    &lt;&lt;: *default
    database: myapp_development
  
  test:
    &lt;&lt;: *default
    database: myapp_test
  
  production:
    &lt;&lt;: *default
    database: myapp_production
    username: myapp
    password: &lt;%= ENV['MYAPP_DATABASE_PASSWORD'] %&gt;
  </code></pre>
  
  <p>Again, any <code>rake</code> or <code>rails</code> command nets me this error. i.e: <code>rake db:migrate</code> or <code>rails console</code>.</p>
  
  <p>any suggestions would be greatly appreciated.</p>
  
  <p>jc</p>