【发布时间】:2013-02-20 08:23:27
【问题描述】:
我在 Heroku 上运行 Rails 应用时遇到问题。
我根据 Rails 教程 Michael Hartl 编写的应用程序。当我加载页面时,我得到:
很抱歉,出了点问题。
基本信息日志:
ActionView::Template::Error :Error (PG::Error :Error: syntax error at or near ")"
count_column FROM "microposts"
我在views/pages/home.html.erb 中遇到的麻烦。我的其他页面没问题..可能在部分布局或页面中,。我不知道。点击这里这是my Application
在这个应用程序中,作为根路径的页面主页成功出现,但如果我登录,页面主页出现heroku消息
很抱歉,出了点问题
views/pages/home.html.erb
<% if signed_in? %>`
<table class="profile" summary="For signed-in users">
<tr>
<td class="sidebar round">
<h1 class="micropost">What's up?</h1>
<%= render 'shared/micropost_form' %>
<%= render 'shared/feed' %>
</td>
<td class="main">
<%= render 'shared/user_info' %>
</td>
</tr>
</table>
<% else %>
<h3>Welcome to rails App by example</h3>
<p>Find out your friend, happening, connect to people or some the activities, organization and more</p>
<%= link_to "Sign up now!", 'signup', :class => "signup_button round" %>
<% end %>
我在跑步
heroku 日志 -t
ActionView::Template::Error :Error (PG::Error :Error: relation "users" doest not exist
LINE 1: SELECT "users".* FROM "users" WHERE "users"."auth_token"=...
感谢之前
【问题讨论】:
-
看起来 Postgres 和您的 SQL 有问题。
-
在终端上运行:heroku logs -t,并发布错误
-
您应该尝试在本地重现该问题。您是否在开发中运行 Postgres?
-
在开发中我使用 SQLite
标签: ruby-on-rails postgresql heroku