Rails + Heroku:ActionView :: Template :: Error [英] Rails + Heroku : ActionView::Template::Error

查看:140
本文介绍了Rails + Heroku:ActionView :: Template :: Error的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将我的Rails应用程序部署到heroku时遇到问题。我只是修复了一个错误 Rails + Heroku:我们很抱歉,但是出错了,但我想还有更多。任何人都可以帮助指导我如何调试它?我被卡住了,因为heroku没有告诉我错误发生在哪一行。对不起,麻烦了。



如果你想看看,这里有我的所有代码。
https://github.com/EdmundMai/pholderbeta



让我知道你是否希望我粘贴任何东西。



Heroku日志:

  2012-10-29T16:43:41 + 00:00 app [web.1]:在328ms内完成500次内部服务器错误
2012-10-29T16:43: 41 + 00:00 app [web.1]:
2012-10-29T16:43:41 + 00:00 app [web.1]:LINE 4:WHERE a.attrelid ='users': :regclass
2012-10-29T16:43:41 + 00:00 app [web.1]:ActionView :: Template :: Error(PG :: Error:错误:关系用户不存在
2012-10-29T16:43:41 + 00:00 app [web.1]:^
2012-10-29T16:43:41 + 00:00 app [web.1]:ON a。 attrelid = d.adrelid AND a.attnum = d.adnum
2012-10-29T16:43:41 + 00:00 app [web.1]:FROM pg_attribute a LEFT JOIN pg_attrdef d
2012- 10-29T16:43:41 + 00:00 app [web.1]::SELECT a.attname,format_type(a.atttypid,a。 atttypmod),d.adsrc,a.attnotnull
2012-10-29T16:43:41 + 00:00 app [web.1]:WHERE a.attrelid ='users':regclass
2012-10-29T16:43:41 + 00:00 app [web.1]:AND a.attnum> 0 AND NOT a.attisdropped
2012-10-29T16:43:41 + 00:00 app [web.1]:ORDER BY a.attnum
2012-10-29T16:43:41 + 00 :00 app [web.1]:):
2012-10-29T16:43:41 + 00:00 app [web.1]:1:
2012-10-29T16:43:41 +00:00 app [web.1]:2:< nav class =clearfix>
2012-10-29T16:43:41 + 00:00 app [web.1]:3:<%if!signed_in? %GT;
2012-10-29T16:43:41 + 00:00 app [web.1]:4:<%= link_tohome,root_url%>
2012-10-29T16:43:41 + 00:00 app [web.1]:5:<%else%>
2012-10-29T16:43:41 + 00:00 app [web.1]:6:<%= link_tomy profile,current_user%>
2012-10-29T16:43:41 + 00:00 app [web.1]:app / helpers / sessions_helper.rb:26:在`current_user'
2012-10-29T16:43: 41 + 00:00 app [web.1]:app / helpers / sessions_helper.rb:13:在`signed_in?'
2012-10-29T16:43:41 + 00:00 app [web.1] :app / views / layouts / _header.html.erb:3:在_app_views_layouts__header_html_erb__4262906123720065777_48014220'
2012-10-29T16:43:41 + 00:00 app [web.1]:
2012-10 -29T16:43:41 + 00:00 app [web.1]:app / views / layouts / application.html.erb:13:in _app_views_layouts_application_html_erb__2281927286696150034_48418280'
2012-10-29T16:43:41 + 00 :00 app [web.1]:
2012-10-29T16:43:41 + 00:00 heroku [路由器]:GET pacific-ravine-3563.herokuapp.com/favicon.ico dyno = web.1队列= 0等待= 0ms服务= 11ms状态= 200字节= 1150
2012-10-29T16:46:26 + 00:00 heroku [slugc]:Slug编译开始
2012-10-29T16: 46:53 + 00:00 heroku [web.1]:状态从最初变为
2012-10-29T16:46:53 + 00:00 heroku [slugc]:Slug汇编完成
2012 -10-2 9T16:46:56 + 00:00 heroku [web.1]:使用命令`bundle exec rails server -p 30276`启动进程
2012-10-29T16:46:57 + 00:00 heroku [web。 1]:使用SIGTERM
停止所有进程2012-10-29T16:46:58 + 00:00 app [web.1]:[2012-10-29 16:46:58] ERROR SignalException:SIGTERM
2012-10-29T16:46:58 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in`select'
2012-10-29T16:47:04 + 00:00 app [web.1]:DEPRECATION警告:您在供应商/插件中使用Rails 2.3风格的插件!在Rails 4.0中将会删除对这些插件的支持。将它们移出并将它们捆绑到Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。有关更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。 (从/app/config/environment.rb:5上的< top(required)>调用)
2012-10-29T16:47:04 + 00:00 app [web.1]:DEPRECATION WARNING:你在供应商/插件中有Rails 2.3风格的插件!在Rails 4.0中将会删除对这些插件的支持。将它们移出并将它们捆绑到Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。有关更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。 (从/app/config/environment.rb:5上的< top(required)>调用)
2012-10-29T16:47:08 + 00:00 heroku [web.1]:错误R12退出超时) - >在SIGTERM
2012-10-29T16:47:08 + 00:00的10秒内至少有一个进程无法退出heroku [web.1]:使用SIGKILL停止剩余进程
2012-10-29T16 :47:08 + 00:00 app [web.1]:=>启动WEBrick
2012-10-29T16:47:08 + 00:00 app [web.1]:=> Rails 3.2.8应用程序在http://0.0.0.0:30276开始生产
2012-10-29T16:47:08 + 00:00 app [web.1]:=>用-d呼叫以分开
2012-10-29T16:47:08 + 00:00 app [web.1]:=> Ctrl-C关闭服务器
2012-10-29T16:47:08 + 00:00 app [web.1]:连接到由DATABASE_URL指定的数据库
2012-10-29T16:47:09+ 00:00 app [web.1]:[2012-10-29 16:47:09] INFO WEBrick 1.3.1
2012-10-29T16:47:09 + 00:00 app [web.1] :[2012-10-29 16:47:09] INFO ruby​​ 1.9.2(2011-07-09)[x86_64-linux]
2012-10-29T16:47:09 + 00:00 app [web .1]:[2012-10-29 16:47:09] INFO WEBrick :: HTTPServer#start:pid = 2 port = 30276
2012-10-29T16:47:10 + 00:00 heroku [web .1]:进程已退出,状态为137
2012-10-29T16:47:10 + 00:00 heroku [web.1]:状态从开始更改为
2012-10-29T16:47 :46 + 00:00 app [web.1]:开始GET/为66.108.172.226于2012-10-29 16:47:46 +0000
2012-10-29T16:47:46 + 00 :00 app [web.1]:
2012-10-29T16:47:46 + 00:00 app [web.1]:
2012-10-29T16:47:46 + 00:00 app [web.1]:通过HomeController处理#index为HTML
2012-10-29T16:47:46 + 00:00 app [web.1]:在布局/应用程序中渲染home / index.html.erb (12.3ms)
2012-10-29T16:47:46 +00:00 app [web.1]:ActionView :: Template :: Error(PG :: Error:错误:关系用户不存在
2012-10-29T16:47:46 + 00:00 app [web.1]:^
2012-10-29T16:47:46 + 00:00 app [web.1]:WHERE a.attrelid ='users':regclass
2012 -10-29T16:47:46 + 00:00 app [web.1]:FROM pg_attribute a LEFT JOIN pg_attrdef d
2012-10-29T16:47:46 + 00:00 app [web.1]: AND a.attnum> 0 AND NOT a.attisdropped
2012-10-29T16:47:46 + 00:00 app [web.1]:ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2012-10-29T16:47:46 + 00:00 app [web.1]:渲染布局/ _header.html.erb(59.5ms)
2012-10-29T16:47:46 + 00:00 app [web.1]::SELECT a.attname,format_type(a.atttypid,a.atttypmod),d.adsrc,a.attnotnull
2012-10-29T16:47:46 + 00:00 app [web .1]:
2012-10-29T16:47:46 + 00:00 app [web.1]:在144ms内完成500次内部服务器错误
2012-10-29T16:47:46 + 00 :00 app [web.1]:LINE 4:WHERE a.attrelid ='users'':regclass
2012-10-29T16:47:46 + 00:00 app [web.1]:ORDER BY a.attnum
2012-10-29T16:47:46 + 00:00 app [web.1]:1:
2012-10-29T16:47:46 + 00:00 app [web .1]:2:< nav class =clearfix>
2012-10-29T16:47:46 + 00:00 app [web.1]:3:<%if!signed_in? %GT;
2012-10-29T16:47:46 + 00:00 app [web.1]:4:<%= link_tohome,root_url%>
2012-10-29T16:47:46 + 00:00 app [web.1]:):
2012-10-29T16:47:46 + 00:00 app [web.1]: 6:<%= link_to我的个人资料,current_user%>
2012-10-29T16:47:46 + 00:00 app [web.1]:5:<%else%>
2012-10-29T16:47:46 + 00:00 app [web.1]:app / helpers / sessions_helper.rb:26:在`current_user'
2012-10-29T16:47: 46 + 00:00 app [web.1]:
2012-10-29T16:47:46 + 00:00 app [web.1]:app / helpers / sessions_helper.rb:13:在`signed_in? '
2012-10-29T16:47:46 + 00:00 app [web.1]:app / views / layouts / _header.html.erb:3:in _app_views_layouts__header_html_erb__1629561108313014440_42800200'
2012-10 -29T16:47:46 + 00:00 app [web.1]:app / views / layouts / application.html.erb:13:in _app_views_layouts_application_html_erb__2023541485350786357_43765980'
2012-10-29T16:47:46 + 00 :00 app [web.1]:
2012-10-29T16:47:46 + 00:00 heroku [路由器]:GET pacific-ravine-3563.herokuapp.com/favicon.ico dyno = web.1队列= 0等待= 1ms服务= 12ms状态= 200字节= 1150
2012-10-29T17:04:22 + 00:00 heroku [slugc]:Slug编译开始
2012-10-29T17: 04:41 + 00:00 heroku [slugc]:S comp编辑完成
2012-10-29T17:04:41 + 00:00 heroku [web.1]:状态从最初改为
2012 -10-2 9T17:04:43 + 00:00 heroku [web.1]:用命令`bundle exec rails server -p 38347`启动进程
2012-10-29T17:04:44 + 00:00 heroku [web。 1]:使用SIGTERM
停止所有进程2012-10-29T17:04:44 + 00:00 app [web.1]:[2012-10-29 17:04:44] ERROR SignalException:SIGTERM
2012-10-29T17:04:44 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in`select'
2012-10-29T17:04:50 + 00:00 app [web.1]:弃权警告:在供应商/插件中有Rails 2.3风格的插件!在Rails 4.0中将会删除对这些插件的支持。将它们移出并将它们捆绑到Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。有关更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。 (从/app/config/environment.rb:5上的< top(required)>调用)
2012-10-29T17:04:50 + 00:00 app [web.1]:DEPRECATION WARNING:你在供应商/插件中有Rails 2.3风格的插件!在Rails 4.0中将会删除对这些插件的支持。将它们移出并将它们捆绑到Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。有关更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。 (从/app/config/environment.rb:5上的< top(required)>调用)
2012-10-29T17:04:50 + 00:00 heroku [web.1]:停止所有进程与SIGTERM
2012-10-29T17:04:51 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in`select '
2012-10-29T17:04:51 + 00:00 app [web.1]:[2012-10-29 17:04:51] ERROR SignalException:SIGTERM
2012-10-29T17 :04:55 + 00:00 app [web.1]:=>启动WEBrick
2012-10-29T17:04:55 + 00:00 app [web.1]:=> Rails 3.2.8应用程序在http://0.0.0.0:38347
2012-10-29T17:04:55 + 00:00 app [web.1]:=>用-d呼叫以分离
2012-10-29T17:04:55 + 00:00 app [web.1]:=> Ctrl-C关闭服务器
2012-10-29T17:04:55 + 00:00应用[web.1]:连接到由DATABASE_URL指定的数据库
2012-10-29T17:04:55+ 00:00 heroku [web.1]:错误R12(退出超时) - >在SIGTERM
2012-10-29T17:04:55 + 00:00的10秒内至少有一个进程无法退出heroku [web.1]:使用SIGKILL停止其余进程
2012-10-29T17 :04:55 + 00:00 app [web.1]:[2012-10-29 17:04:55] INFO WEBrick 1.3.1
2012-10-29T17:04:55 + 00:00 app [web.1]:[2012-10-29 17:04:55] INFO ruby​​ 1.9.2(2011-07-09)[x86_64-linux]
2012-10-29T17:04:55 + 00 :00 app [web.1]:[2012-10-29 17:04:55] INFO WEBrick :: HTTPServer#start:pid = 2 port = 38347
2012-10-29T17:04:56 + 00 :00 heroku [web.1]:状态从开始改为
2012-10-29T17:04:57 + 00:00 heroku [web.1]:进程已退出,状态为137

schema

  ActiveRecord: :Schema.define(:version => 20121024185036)do 

create_tablealbums,:force => true do | t |
t.stringname
t.datetimecreated_at,:null => false
t.datetimeupdated_at,:null => false
t.stringdescription
t.stringstatus
end

create_tablefriendships,:force => true do | t |
t.integeruser_id
t.integerfriend_id
t.datetimecreated_at,:null => false
t.datetimeupdated_at,:null => false
t.stringstatus
结束

create_table所有权,:id => false,:force => true do | t |
t.integeralbum_id
t.integeruser_id
t.stringstatus
结束

create_tablephotos,:force => true do | t |
t.stringavatar_file_name
t.stringavatar_content_type
t.integeravatar_file_size
t.datetimeavatar_updated_at
t.datetimecreated_at ,:null => false
t.datetimeupdated_at,:null => false
t.integeralbum_id
end

create_tableusers,:force => true do | t |
t.stringname
t.stringemail
t.datetimecreated_at,:null => false
t.datetimeupdated_at,:null => false
t.stringpassword_digest
t.stringremember_token
t.stringprofilepic_file_name
t.stringprofilepic_content_type
t.integerprofilepic_file_size
t.datetimeprofilepic_updated_at
t.stringpassword_reset_token
结束

add_indexusers,[remember_token],:name => index_users_on_remember_token

结束

heroku和本地db:版本

  Edmunds-MacBook-Pro:pholder edmundmai $ heroku run rake db:version 
运行`rake db:版本`连接到终端... up,run.1
DEPRECATION警告:你在供应商/插件中有Rails 2.3风格的插件!在Rails 4.0中将会删除对这些插件的支持。将它们移出并将它们捆绑到Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。有关更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。 (从/ app / Rakefile中的< top(required)>调用:7)
DEPRECATION WARNING:在供应商/插件中有Rails 2.3风格的插件!在Rails 4.0中将会删除对这些插件的支持。将它们移出并将它们捆绑到Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。有关更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。 (从/ app / Rakefile中的< top(required)>调用:7)
连接到由DATABASE_URL指定的数据库
当前版本:20120929230317
Edmunds-MacBook-Pro:pholder edmundmai $ rake db:version
当前版本:20121024185036


解决方案

根据回溯,错误位于模板的第3行 - 如果您查看postgres错误,您收到的消息是错误:关系用户不存在。你是否运行数据库迁移?


I'm having trouble deploying my rails app to heroku. I just fixed an error Rails + Heroku : We're sorry, but something went wrong but I guess there were more. Can anyone help guide me on how to debug it? I am stuck because heroku doesn't tell me what line the error occurs. Sorry for the bother.

Here's all my code if you want to take a look. https://github.com/EdmundMai/pholderbeta

Let me know if you want me to paste anything.

Heroku Logs:

2012-10-29T16:43:41+00:00 app[web.1]: Completed 500 Internal Server Error in 328ms
2012-10-29T16:43:41+00:00 app[web.1]: 
2012-10-29T16:43:41+00:00 app[web.1]: LINE 4:              WHERE a.attrelid = '"users"'::regclass
2012-10-29T16:43:41+00:00 app[web.1]: ActionView::Template::Error (PG::Error: ERROR:  relation "users" does not exist
2012-10-29T16:43:41+00:00 app[web.1]:                                         ^
2012-10-29T16:43:41+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2012-10-29T16:43:41+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
2012-10-29T16:43:41+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
2012-10-29T16:43:41+00:00 app[web.1]:              WHERE a.attrelid = '"users"'::regclass
2012-10-29T16:43:41+00:00 app[web.1]:                AND a.attnum > 0 AND NOT a.attisdropped
2012-10-29T16:43:41+00:00 app[web.1]:              ORDER BY a.attnum
2012-10-29T16:43:41+00:00 app[web.1]: ):
2012-10-29T16:43:41+00:00 app[web.1]:     1: 
2012-10-29T16:43:41+00:00 app[web.1]:     2:        <nav class="clearfix">
2012-10-29T16:43:41+00:00 app[web.1]:     3:            <% if !signed_in? %>
2012-10-29T16:43:41+00:00 app[web.1]:     4:                <%= link_to "home", root_url %>
2012-10-29T16:43:41+00:00 app[web.1]:     5:            <% else %>
2012-10-29T16:43:41+00:00 app[web.1]:     6:                <%= link_to "my profile", current_user %>
2012-10-29T16:43:41+00:00 app[web.1]:   app/helpers/sessions_helper.rb:26:in `current_user'
2012-10-29T16:43:41+00:00 app[web.1]:   app/helpers/sessions_helper.rb:13:in `signed_in?'
2012-10-29T16:43:41+00:00 app[web.1]:   app/views/layouts/_header.html.erb:3:in `_app_views_layouts__header_html_erb__4262906123720065777_48014220'
2012-10-29T16:43:41+00:00 app[web.1]: 
2012-10-29T16:43:41+00:00 app[web.1]:   app/views/layouts/application.html.erb:13:in `_app_views_layouts_application_html_erb__2281927286696150034_48418280'
2012-10-29T16:43:41+00:00 app[web.1]: 
2012-10-29T16:43:41+00:00 heroku[router]: GET pacific-ravine-3563.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=11ms status=200 bytes=1150
2012-10-29T16:46:26+00:00 heroku[slugc]: Slug compilation started
2012-10-29T16:46:53+00:00 heroku[web.1]: State changed from up to starting
2012-10-29T16:46:53+00:00 heroku[slugc]: Slug compilation finished
2012-10-29T16:46:56+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 30276`
2012-10-29T16:46:57+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-10-29T16:46:58+00:00 app[web.1]: [2012-10-29 16:46:58] ERROR SignalException: SIGTERM
2012-10-29T16:46:58+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2012-10-29T16:47:04+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-10-29T16:47:04+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-10-29T16:47:08+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2012-10-29T16:47:08+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2012-10-29T16:47:08+00:00 app[web.1]: => Booting WEBrick
2012-10-29T16:47:08+00:00 app[web.1]: => Rails 3.2.8 application starting in production on http://0.0.0.0:30276
2012-10-29T16:47:08+00:00 app[web.1]: => Call with -d to detach
2012-10-29T16:47:08+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-10-29T16:47:08+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2012-10-29T16:47:09+00:00 app[web.1]: [2012-10-29 16:47:09] INFO  WEBrick 1.3.1
2012-10-29T16:47:09+00:00 app[web.1]: [2012-10-29 16:47:09] INFO  ruby 1.9.2 (2011-07-09) [x86_64-linux]
2012-10-29T16:47:09+00:00 app[web.1]: [2012-10-29 16:47:09] INFO  WEBrick::HTTPServer#start: pid=2 port=30276
2012-10-29T16:47:10+00:00 heroku[web.1]: Process exited with status 137
2012-10-29T16:47:10+00:00 heroku[web.1]: State changed from starting to up
2012-10-29T16:47:46+00:00 app[web.1]: Started GET "/" for 66.108.172.226 at 2012-10-29 16:47:46 +0000
2012-10-29T16:47:46+00:00 app[web.1]: 
2012-10-29T16:47:46+00:00 app[web.1]: 
2012-10-29T16:47:46+00:00 app[web.1]: Processing by HomeController#index as HTML
2012-10-29T16:47:46+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (12.3ms)
2012-10-29T16:47:46+00:00 app[web.1]: ActionView::Template::Error (PG::Error: ERROR:  relation "users" does not exist
2012-10-29T16:47:46+00:00 app[web.1]:                                         ^
2012-10-29T16:47:46+00:00 app[web.1]:              WHERE a.attrelid = '"users"'::regclass
2012-10-29T16:47:46+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
2012-10-29T16:47:46+00:00 app[web.1]:                AND a.attnum > 0 AND NOT a.attisdropped
2012-10-29T16:47:46+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2012-10-29T16:47:46+00:00 app[web.1]:   Rendered layouts/_header.html.erb (59.5ms)
2012-10-29T16:47:46+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
2012-10-29T16:47:46+00:00 app[web.1]: 
2012-10-29T16:47:46+00:00 app[web.1]: Completed 500 Internal Server Error in 144ms
2012-10-29T16:47:46+00:00 app[web.1]: LINE 4:              WHERE a.attrelid = '"users"'::regclass
2012-10-29T16:47:46+00:00 app[web.1]:              ORDER BY a.attnum
2012-10-29T16:47:46+00:00 app[web.1]:     1: 
2012-10-29T16:47:46+00:00 app[web.1]:     2:        <nav class="clearfix">
2012-10-29T16:47:46+00:00 app[web.1]:     3:            <% if !signed_in? %>
2012-10-29T16:47:46+00:00 app[web.1]:     4:                <%= link_to "home", root_url %>
2012-10-29T16:47:46+00:00 app[web.1]: ):
2012-10-29T16:47:46+00:00 app[web.1]:     6:                <%= link_to "my profile", current_user %>
2012-10-29T16:47:46+00:00 app[web.1]:     5:            <% else %>
2012-10-29T16:47:46+00:00 app[web.1]:   app/helpers/sessions_helper.rb:26:in `current_user'
2012-10-29T16:47:46+00:00 app[web.1]: 
2012-10-29T16:47:46+00:00 app[web.1]:   app/helpers/sessions_helper.rb:13:in `signed_in?'
2012-10-29T16:47:46+00:00 app[web.1]:   app/views/layouts/_header.html.erb:3:in `_app_views_layouts__header_html_erb__1629561108313014440_42800200'
2012-10-29T16:47:46+00:00 app[web.1]:   app/views/layouts/application.html.erb:13:in `_app_views_layouts_application_html_erb__2023541485350786357_43765980'
2012-10-29T16:47:46+00:00 app[web.1]: 
2012-10-29T16:47:46+00:00 heroku[router]: GET pacific-ravine-3563.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=1ms service=12ms status=200 bytes=1150
2012-10-29T17:04:22+00:00 heroku[slugc]: Slug compilation started
2012-10-29T17:04:41+00:00 heroku[slugc]: Slug compilation finished
2012-10-29T17:04:41+00:00 heroku[web.1]: State changed from up to starting
2012-10-29T17:04:43+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 38347`
2012-10-29T17:04:44+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-10-29T17:04:44+00:00 app[web.1]: [2012-10-29 17:04:44] ERROR SignalException: SIGTERM
2012-10-29T17:04:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2012-10-29T17:04:50+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-10-29T17:04:50+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-10-29T17:04:50+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-10-29T17:04:51+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2012-10-29T17:04:51+00:00 app[web.1]: [2012-10-29 17:04:51] ERROR SignalException: SIGTERM
2012-10-29T17:04:55+00:00 app[web.1]: => Booting WEBrick
2012-10-29T17:04:55+00:00 app[web.1]: => Rails 3.2.8 application starting in production on http://0.0.0.0:38347
2012-10-29T17:04:55+00:00 app[web.1]: => Call with -d to detach
2012-10-29T17:04:55+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-10-29T17:04:55+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2012-10-29T17:04:55+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2012-10-29T17:04:55+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2012-10-29T17:04:55+00:00 app[web.1]: [2012-10-29 17:04:55] INFO  WEBrick 1.3.1
2012-10-29T17:04:55+00:00 app[web.1]: [2012-10-29 17:04:55] INFO  ruby 1.9.2 (2011-07-09) [x86_64-linux]
2012-10-29T17:04:55+00:00 app[web.1]: [2012-10-29 17:04:55] INFO  WEBrick::HTTPServer#start: pid=2 port=38347
2012-10-29T17:04:56+00:00 heroku[web.1]: State changed from starting to up
2012-10-29T17:04:57+00:00 heroku[web.1]: Process exited with status 137

schema

ActiveRecord::Schema.define(:version => 20121024185036) do

create_table "albums", :force => true do |t|
  t.string   "name"
  t.datetime "created_at",  :null => false
  t.datetime "updated_at",  :null => false
  t.string   "description"
  t.string   "status"
end

create_table "friendships", :force => true do |t|
  t.integer  "user_id"
  t.integer  "friend_id"
  t.datetime "created_at", :null => false
  t.datetime "updated_at", :null => false
  t.string   "status"
end

create_table "ownerships", :id => false, :force => true do |t|
  t.integer "album_id"
  t.integer "user_id"
  t.string  "status"
end

create_table "photos", :force => true do |t|
  t.string   "avatar_file_name"
  t.string   "avatar_content_type"
  t.integer  "avatar_file_size"
  t.datetime "avatar_updated_at"
  t.datetime "created_at",          :null => false
  t.datetime "updated_at",          :null => false
  t.integer  "album_id"
end

create_table "users", :force => true do |t|
  t.string   "name"
  t.string   "email"
  t.datetime "created_at",              :null => false
  t.datetime "updated_at",              :null => false
  t.string   "password_digest"
  t.string   "remember_token"
  t.string   "profilepic_file_name"
  t.string   "profilepic_content_type"
  t.integer  "profilepic_file_size"
  t.datetime "profilepic_updated_at"
  t.string   "password_reset_token"
end

add_index "users", ["remember_token"], :name => "index_users_on_remember_token"

end

heroku and local db:version

Edmunds-MacBook-Pro:pholder edmundmai$ heroku run rake db:version
Running `rake db:version` attached to terminal... up, run.1
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
Connecting to database specified by DATABASE_URL
Current version: 20120929230317
Edmunds-MacBook-Pro:pholder edmundmai$ rake db:version
Current version: 20121024185036

解决方案

According to the traceback, the error is at line 3 in your template - if you look at the postgres error, the message you're getting is ERROR: relation "users" does not exist. Have you run your database migrations?

这篇关于Rails + Heroku:ActionView :: Template :: Error的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆