0
我git從github推送我的項目的heroku master,但是當我做heroku打開它時ActiveRecord :: StatementInvalid in Pins#index顯示/app/app/views/pins/index.html.erb其中第4行提出:
的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: <%= render 'pages/home' %>
2:
3: <div id="pins">
4: <%= render @pins %>
5: </div>
6:
7: <%= will_paginate @pins %>
有人能幫忙嗎?它在本地工作正常,但我得到的應用程序部署在Heroku上。非常感激。
你運行遷移? – Santhosh
它在本地工作正常,只是不在heorku,所以我想我做到了。 –
好的,但是你是否在Heroku上遷移了數據庫或加載了你的模式? – Santhosh