引脚中的ActiveRecord :: StatementInvalid #index显示/app/app/views/pins/index.html.erb第4行引发:

我git从github推送heroku master用于我的项目,但是当我打开heroku时它会说

Pins #index中的ActiveRecord :: StatementInvalid

显示/app/app/views/pins/index.html.erb第4行引发:

PG::UndefinedTable: ERROR: relation "pins" does not exist LINE 5: WHERE a.attrelid = '"pins"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"pins"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum Extracted source (around line #4): 1:  2: 3: 
4: 5:
6: 7:

有人可以帮忙吗? 它在本地工作正常,但我得到了在Heroku上部署的应用程序。 非常感激。

错误PG::UndefinedTable: ERROR: relation "pins" does not exist

表示缺少表格。 您必须在Heroku上迁移数据库

在你推送到Heroku ,你可以做heroku run rake db:migrate