Hartl的铁轨教程完成了当地完美的作品。 Heroku坚持“我们很抱歉,但出了问题。” [英] Hartl's rails tutorial completed works locally perfect. Heroku persists "We're sorry, but something went wrong."

查看:86
本文介绍了Hartl的铁轨教程完成了当地完美的作品。 Heroku坚持“我们很抱歉,但出了问题。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Ruby on Rails的新手(完全是编程的新手),这是我的第一篇关于堆栈溢出的文章。我想先感谢大家,因为我从以前的文章中学到了很多。



我完成了Micheal Hartl Ruby on Rails教程,但无法成功启动在Heroku上,即使它在当地完美运行。



Iv完成以下操作:


git push



git push heroku master

heroku pg:reset DATABASE



heroku run rake db:migrate

heroku run rake db:populate


(I也做了这个没有heroku重启,结果相同)

事情出错了,当我执行命令时:heroku run rake db:populate



这是我的英雄日志

  2013-04-23T18:27:42.388610 + 00:00 heroku [web .1]:错误R12(退出超时) - >至少有一个进程在SIGTERM 
2013-04-23T18:27:42.388610 + 00:00的10秒内未能退出heroku [web.1]:用SIGKILL停止剩余进程
2013-04-23T18 :27:44.355310 + 00:00 heroku [web.1]:进程已退出,状态为137
2013-04-23T18:27:50.065370 + 00:00 app [web.1]:SessionsController处理#new as HTML
2013-04-23T18:27:50.062379 + 00:00 app [web.1]:开始GET/ signinfor 75.68.91.34 at 2013-04-23 18:27:50 +0000
2013-04-23T18:27:50.091947 + 00:00 app [web.1]:在布局/应用程序中呈现sessions / new.html.erb(24.8ms)
2013-04-23T18:27: 50.093017 + 00:00 app [web.1]:渲染布局/ _shim.html.erb(0.0ms)
2013-04-23T18:27:50.095496 + 00:00 app [web.1]:渲染布局/_header.html.erb(2.2ms)
2013-04-23T18:27:50.096137 + 00:00 app [web.1]:在31ms内完成200行(视图:29.2ms | ActiveRecord:1.0ms)
2013-04-23T18:27:50.095966 + 00:00 app [web.1]:渲染布局/ _footer.html.erb(0.3ms)
2013-04-23T18:27:50.102068+ 00:00 heroku [router]:at = info method = GET path = / signin host = polar-wildwood-1990.herokuapp.com fwd =75.68.91.34dyno = web.1 connect = 2ms service = 48ms status = 200 bytes = 2144
2013-04-23T18:27:52.271911 + 00:00 app [web.1]:开始GET/ helpfor 75.68.91.34 at 2013-04-23 18:27:52 +0000
2013-04-23T18:27:52.275101 + 00:00 app [web.1]:通过StaticPagesController#帮助处理HTML
2013-04-23T18:27:52.276587 + 00:00 app [ (0.3ms)
2013-04-23T18:27:52.277601 + 00:00 app [web.1]:渲染布局/ _shim。 html.erb(0.0ms)
2013-04-23T18:27:52.281995 + 00:00 app [web.1]:渲染布局/ _header.html.erb(4.1ms)
2013-04 -23T18:27:52.283227 + 00:00 app [web.1]:渲染布局/ _footer.html.erb(0.8ms)
2013-04-23T18:27:52.284385 + 00:00 app [web。 1]:在9ms内完成200 OK(查看:7.2ms | ActiveRecord:1.4ms)
2013-04-23T18:27:52.291644 + 00:00 heroku [router]:at = info method = GET path = / help host = polar-wildwood-1990.herokuapp.com fwd = 75.68.91.34dyno = web.1 connect = 2ms service = 21ms status = 200 bytes = 1639
2013-04-23T18:27:53.244364 + 00:00 heroku [router]:at = info method = GET path = / host = polar-wildwood-1990.herokuapp.com fwd =75.68.91.34dyno = web.1 connect = 2ms service = 18ms status = 304 bytes = 0
2013-04-23T18:27: 53.227078 + 00:00 app [web.1]:开始GET/为75.68.91.34于2013-04-23 18:27:53 +0000
2013-04-23T18:27:53.230685 + 00: 00 app [web.1]:通过StaticPagesController#home作为HTML进行处理
2013-04-23T18:27:53.233227 + 00:00 app [web.1]:在布局中呈现static_pages / home.html.erb /应用程序(0.6ms)
2013-04-23T18:27:53.234925 + 00:00 app [web.1]:渲染布局/ _header.html.erb(0.8ms)
2013-04-23T18 :27:53.234029 + 00:00 app [web.1]:渲染布局/ _shim.html.erb(0.0ms)
2013-04-23T18:27:53.235301 + 00:00 app [web.1] :渲染布局/ _footer.html.erb(0.3ms)
2013-04-23T18:27:53.235416 + 00:00 app [web.1]:在5ms内完成200 OK(查看:3.2ms | ActiveRecord:1.0ms)
2013-04-23T18:27:54.503953 + 00:00 app [web.1]:开始GET/ signinfor 75.68.91.34于2013-04-23 18:27:54 +0000
2013-04-23T18:27:54.506797 + 00:00 app [web.1]:通过SessionsController处理#new as HTML
2013-04-23T18:27:54.509530 + 00:00 app [web.1]:呈现布局/ _shim.html.erb(0.0ms)
2013-04-23T18:27:54.508584 + 00:00 app [web.1]:呈现会话/ new.html。 erb在布局/应用程序中(1.3ms)
2013-04-23T18:27:54.511848 + 00:00 app [web.1]:渲染布局/_header.html.erb(2.1ms)
2013 -04-23T18:27:54.512476 + 00:00 app [web.1]:渲染布局/ _footer.html.erb(0.3ms)
2013-04-23T18:27:54.512701 + 00:00 app [ web.1]:在6ms内完成200 OK(查看:4.7ms | ActiveRecord:1.0ms)
2013-04-23T18:27:54.522049 + 00:00 heroku [router]:at = info method = GET path = / signin host = polar-wildwood-1990.herokuapp.com fwd =75.68.91.34dyno = web.1 connect = 2ms service = 16ms status = 304 bytes = 0
2013-04-23T18:28: 02.210398 + 00:00 app [web.1]:开始GE T/for 75.68.91.34 at 2013-04-23 18:28:02 +0000
2013-04-23T18:28:02.212290 + 00:00 app [web.1]:处理StaticPagesController#home作为HTML
2013-04-23T18:28:02.214616 + 00:00 app [web.1]:在布局/应用程序中呈现static_pages / home.html.erb(0.6ms)
2013-04- 23T18:28:02.215472 + 00:00 app [web.1]:渲染布局/ _shim.html.erb(0.0ms)
2013-04-23T18:28:02.216369 + 00:00 app [web.1 ]:渲染布局/_header.html.erb(0.8ms)
2013-04-23T18:28:02.216867 + 00:00 app [web.1]:在5ms内完成200 OK(查看:3.2ms | ActiveRecord:0.9ms)
2013-04-23T18:28:02.216742 + 00:00 app [web.1]:渲染布局/ _footer.html.erb(0.3ms)
2013-04-23T18 :28:02.224795 + 00:00 heroku [router]:at = info method = GET path = / host = polar-wildwood-1990.herokuapp.com fwd =75.68.91.34dyno = web.1 connect = 2ms service = 15ms status = 304 bytes = 0
2013-04-23T18:28:03.312964 + 00:00 app [web.1]:开始GET/注册为75.68.91.34于2013-04-23 18:28 :03 +0000
2013-04-23T18:28:03.320889 + 00:00 app [web.1]:通过UsersController处理#new as HTML
2013-04-23T18:28:03.330931 + 00 :00 app [web.1]:渲染共享/ _error_messages.html.erb(0.3ms)
2013-04-23T18:28:03.332690 + 00:00 app [web.1]:渲染用户/新。 (4.5ms)
2013-04-23T18:28:03.333486 + 00:00 app [web.1]:渲染布局/ _shim.html.erb(0.0ms)
2013-04-23T18:28:03.335702 + 00:00 app [web.1]:渲染布局/ _header.html.erb(2.1ms)
2013-04-23T18:28:03.336140 + 00:00应用[web.1]:呈现的布局/ _footer.html。 erb(0.3ms)
2013-04-23T18:28:03.336258 + 00:00 app [web.1]:在15ms内完成200 OK(查看:8.2ms | ActiveRecord:1.0ms)
2013-04-23T18:28:03.343166 + 00:00 heroku [router]:at = info method = GET path = / signup host = polar-wildwood-1990.herokuapp.com fwd = 75.68.91.34dyno = web.1 connect = 2ms service = 31ms status = 200 bytes = 2403
2013-04-23T18:28:23.175897 + 00:00 app [web.1]:Processing Users by UsersController#创建为HTML
2013-04-23T18:28:23.172784 + 00:00 app [web.1]:开始POST/ users为75.68.91.34于2013-04-23 18:28:23 +0000
2013-04-23T18:28:23.175897 + 00:00 app [web.1]:参数:{utf8=>✓,authenticity_token=>rdA4wrQvQhEhejI6uTXYg2YZpa5sl7gkYeabVJZQmFA =, =name =Dana Bouchard,email=>dbouchard138@gmail.com,password=>[FILTERED],password_confirmation=> FILTERED]},commit=>创建我的帐户}
2013-04-23T18:28:23.429861 + 00:00应用[web.1]:重定向到https:// polar-wildwood -1990.herokuapp.com/users/1
2013-04-23T18:28:23.433167 + 00:00 app [web.1]:已完成302在256ms中找到(ActiveRecord:21.6ms)
2013 - 04-23T18:28:23.449918 + 00:00 heroku [router]:at = info method = POST path = / users host = polar-wildwood-1990.herokuapp.com fwd =75.68.91.34dyno = web.1 connect = 3ms服务= 315ms状态= 302字节= 115
2013-04-23T18:28:23.497155 + 00:00 app [web.1]:参数:{id=>1}
2013-04-23T18:28:23.490244 + 00:00 app [web.1]:开始GET/ users / 1for 75.68.91.34 at 2013-04-23 18:28:23 +0000
2013-04-23T18:28:23.496980 + 00:00 app [web.1]:通过UsersController处理#显示为HTML
2013-04-23T18:28:23.722402 + 00:00 app [web.1 ]:渲染共享/ _stats.html.erb(54.1ms)
2013-04-23T18:28:23.787319 + 00:00 app [web.1]:渲染用户/ show.html.erb在布局/应用程序中(120.1ms)
2013-04-23T18:28:23.787319 + 00:00 app [web.1]:在290ms内完成500次内部服务器错误
2013-04-23T18:28:23.789034 + 00 :00 app [web.1]:ActionView :: Template :: Error(PGError:ERROR:relationmicropostsdoes not exist
2013-04-23T18:28:23.789034 + 00:00 app [web.1 ]:
2013-04-23T18:28:23.78903 4 + 00:00 app [web.1]:LINE 5:WHERE a.attrelid =''microposts'':regclass
2013-04-23T18:28:23.789034 + 00:00 app [web.1 ]:^
2013-04-23T18:28:23.789034 + 00:00 app [web.1]::SELECT a.attname,format_type(a.atttypid,a.atttypmod),
2013- 04-23T18:28:23.789034 + 00:00 app [web.1]:pg_get_expr(d.adbin,d.adrelid),a.attnotnull,a.atttypid,a.atttypmod
2013-04-23T18: 28:23.789034 + 00:00 app [web.1]:FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-04-23T18:28:23.789034 + 00:00 app [web.1]:ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2013-04-23T18:28:23.789034 + 00:00 app [web.1]:
WHERE a.attrelid =''microposts'': :regclass
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:):
2013-04-23T18:28:23.789293 + 00:00 app [web.1 ]:ORDER BY a.attnum
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:15:<%= render'follow_form'if signed_in? %GT;
2013-04-23T18:28:23.789034 + 00:00 app [web.1]:AND a.attnum> 0 AND NOT a.attisdropped
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:13:< / aside>
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:14:< div class =span8>
2013-04-23T18:28:23.800620 + 00:00 heroku [router]:at = info method = GET path = / users / 1 host = polar-wildwood-1990.herokuapp.com fwd =75.68。 91.34dyno = web.1 connect = 2ms service = 313ms status = 500 bytes = 643
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:16:<%if @ user.microposts.any? %GT;
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:17:< h3> Microposts(<%= @ user.microposts.count%>)< / h3> ;
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:18:< ol class =microposts>
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:19:<%= render @microposts%>
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:app / views / users / show.html.erb:16:in _app_views_users_show_html_erb__4534392174835113617_69860797342160'
2013-04- 23T18:28:23.789517 + 00:00 app [web.1]:
2013-04-23T18:28:23.789517 + 00:00 app [web.1]:
2013-04-23T18: 28:38.118917 + 00:00 heroku [api]:用命令`bundle exec rake db:populate`启动进程dbouchard138@gmail.com
2013-04-23T18:28:40.122057 + 00:00 heroku [run .9072]:等待客户
2013-04-23T18:28:40.141935 + 00:00 heroku [run.9072]:用命令`bundle exec rake db:populate`启动进程
2013-04- 23T18:28:41.013463 + 00:00 heroku [run.9072]:状态从开始变为上升
2013-04-23T18:29:06.377140 + 00:00 heroku [run.9072]:进程退出状态1
2013-04-23T18:29:06.395386 + 00:00 heroku [run.9072]:从状态变为完成
2013-04-23T19:31:08.418618 + 00:00 heroku [ web.1]:怠速
2013-04-23T19:31:11.275801 + 00:00 heroku [web.1]:用SIGTERM停止所有进程
2013-04-23T19:31:12.010696 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in`select'
2013-04-23T19:31:12.010696 + 00:00 app [web.1]:[2013-04-23 19:31:12] ERROR SignalException:SIGTERM
2013-04-23T19:31 :22.107373 + 00:00 heroku [web.1]:错误R12(退出超时) - >至少有一个进程在SIGTERM
2013-04-23T19:31:22.107928 + 00:00的10秒内未能退出heroku [web.1]:使用SIGKILL停止其余进程
2013-04-23T19 :31:23.892161 + 00:00 heroku [web.1]:状态从上到下变化
2013-04-23T19:31:23.878809 + 00:00 heroku [web.1]:进程已退出,状态为137

这很容易解决,我认为下面是小提琴,但我无法弄清楚为什么或如何找到问题。

  2013-04-23T18:28:23.789034 + 00:00 app [web.1]:ActionView :: Template :: Error(PGError:ERROR:relationmicropostsdoes not exist 
2013-04-23T18:28:23.789034 + 00:00 app [web.1]:
2013-04-23T18:28:23.789034 +00:00 app [web.1]:LINE 5:WHERE a.attrelid ='microposts'':regclass
2013-04-23T18:28:23.789034 + 00:00 app [web.1] :^
2013-04-23T18:28:23.789034 + 00:00 app [web.1]::SELECT a.attname,format_type(a.atttypid,a.atttypmod),
2013-04 -23T18:28:23.789034 + 00:00 app [web.1]:pg_get_expr(d.adbin,d.adrelid),a.attnotnull,a.atttypid,a.atttypmod
2013-04-23T18:28 :23.789034 + 00:00 app [web.1]:FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-04-23T18:28:23.789034 + 00:00 app [web.1]:ON a.attrelid = d .adrelid AND a.attnum = d.adnum
2013-04-23T18:28:23.789034 + 00:00 app [web.1]:
WHERE a.attrelid =''microposts'':: REGC lass
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:):
2013-04-23T18:28:23.789293 + 00:00 app [web.1] :ORDER BY a.attnum
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:15:<%= render'follow_form'if signed_in? %GT;
2013-04-23T18:28:23.789034 + 00:00 app [web.1]:AND a.attnum> 0 AND NOT a.attisdropped
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:13:< / aside>
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:14:< div class =span8>
2013-04-23T18:28:23.800620 + 00:00 heroku [router]:at = info method = GET path = / users / 1 host = polar-wildwood-1990.herokuapp.com fwd =75.68。 91.34dyno = web.1 connect = 2ms service = 313ms status = 500 bytes = 643
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:16:<%if @ user.microposts.any? %GT;
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:17:< h3> Microposts(<%= @ user.microposts.count%>)< / h3> ;
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:18:< ol class =microposts>
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:19:<%= render @microposts%>
2013-04-23T18:28:23.789293 + 00:00 app [web.1]:app / views / users / show.html.erb:16:in _app_views_users_show_html_erb__4534392174835113617_69860797342160'

请帮助,如果您需要更多信息,请告诉我。
预先感谢您。

解决方案

听起来像你没有将架构加载到你的heroku数据库中。在执行此操作后部署会发生什么:

  heroku run rake db:schema:load 
rake db:schema:load
来代替。



运行后,您可以使用 heroku run console ,然后执行控制台命令(如 User.all )以确保它知道 users 表存在等。



不要忘记在加载架构或运行 db:migrate 后重新启动服务器。对于heroku来说: heroku restart


I'm new to Ruby on Rails (new to programming altogether) and this is my first post on stack overflow. I want to thank everyone in advance because I have learned so much from previous posts.

I completed the Micheal Hartl Ruby on Rails Tutorial but can't get it to launch successfully on Heroku even though it works perfect locally.

Iv done the following:

git push

git push heroku master

heroku pg:reset DATABASE

heroku run rake db:migrate

heroku run rake db:populate

(I have also done this without heroku restart with same results)

Things go wrong when I preform command: heroku run rake db:populate

Here is my heroku log

2013-04-23T18:27:42.388610+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2013-04-23T18:27:42.388610+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2013-04-23T18:27:44.355310+00:00 heroku[web.1]: Process exited with status 137
2013-04-23T18:27:50.065370+00:00 app[web.1]: Processing by SessionsController#new as HTML
2013-04-23T18:27:50.062379+00:00 app[web.1]: Started GET "/signin" for 75.68.91.34 at 2013-04-23 18:27:50 +0000
2013-04-23T18:27:50.091947+00:00 app[web.1]:   Rendered sessions/new.html.erb within layouts/application (24.8ms)
2013-04-23T18:27:50.093017+00:00 app[web.1]:   Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:50.095496+00:00 app[web.1]:   Rendered layouts/_header.html.erb (2.2ms)
2013-04-23T18:27:50.096137+00:00 app[web.1]: Completed 200 OK in 31ms (Views: 29.2ms | ActiveRecord: 1.0ms)
2013-04-23T18:27:50.095966+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:27:50.102068+00:00 heroku[router]: at=info method=GET path=/signin host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=48ms status=200 bytes=2144
2013-04-23T18:27:52.271911+00:00 app[web.1]: Started GET "/help" for 75.68.91.34 at 2013-04-23 18:27:52 +0000
2013-04-23T18:27:52.275101+00:00 app[web.1]: Processing by StaticPagesController#help as HTML
2013-04-23T18:27:52.276587+00:00 app[web.1]:   Rendered static_pages/help.html.erb within layouts/application (0.3ms)
2013-04-23T18:27:52.277601+00:00 app[web.1]:   Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:52.281995+00:00 app[web.1]:   Rendered layouts/_header.html.erb (4.1ms)
2013-04-23T18:27:52.283227+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.8ms)
2013-04-23T18:27:52.284385+00:00 app[web.1]: Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 1.4ms)
2013-04-23T18:27:52.291644+00:00 heroku[router]: at=info method=GET path=/help host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=21ms status=200 bytes=1639
2013-04-23T18:27:53.244364+00:00 heroku[router]: at=info method=GET path=/ host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=18ms status=304 bytes=0
2013-04-23T18:27:53.227078+00:00 app[web.1]: Started GET "/" for 75.68.91.34 at 2013-04-23 18:27:53 +0000
2013-04-23T18:27:53.230685+00:00 app[web.1]: Processing by StaticPagesController#home as HTML
2013-04-23T18:27:53.233227+00:00 app[web.1]:   Rendered static_pages/home.html.erb within layouts/application (0.6ms)
2013-04-23T18:27:53.234925+00:00 app[web.1]:   Rendered layouts/_header.html.erb (0.8ms)
2013-04-23T18:27:53.234029+00:00 app[web.1]:   Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:53.235301+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:27:53.235416+00:00 app[web.1]: Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 1.0ms)
2013-04-23T18:27:54.503953+00:00 app[web.1]: Started GET "/signin" for 75.68.91.34 at 2013-04-23 18:27:54 +0000
2013-04-23T18:27:54.506797+00:00 app[web.1]: Processing by SessionsController#new as HTML
2013-04-23T18:27:54.509530+00:00 app[web.1]:   Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:54.508584+00:00 app[web.1]:   Rendered sessions/new.html.erb within layouts/application (1.3ms)
2013-04-23T18:27:54.511848+00:00 app[web.1]:   Rendered layouts/_header.html.erb (2.1ms)
2013-04-23T18:27:54.512476+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:27:54.512701+00:00 app[web.1]: Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 1.0ms)
2013-04-23T18:27:54.522049+00:00 heroku[router]: at=info method=GET path=/signin host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=16ms status=304 bytes=0
2013-04-23T18:28:02.210398+00:00 app[web.1]: Started GET "/" for 75.68.91.34 at 2013-04-23 18:28:02 +0000
2013-04-23T18:28:02.212290+00:00 app[web.1]: Processing by StaticPagesController#home as HTML
2013-04-23T18:28:02.214616+00:00 app[web.1]:   Rendered static_pages/home.html.erb within layouts/application (0.6ms)
2013-04-23T18:28:02.215472+00:00 app[web.1]:   Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:28:02.216369+00:00 app[web.1]:   Rendered layouts/_header.html.erb (0.8ms)
2013-04-23T18:28:02.216867+00:00 app[web.1]: Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.9ms)
2013-04-23T18:28:02.216742+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:28:02.224795+00:00 heroku[router]: at=info method=GET path=/ host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=15ms status=304 bytes=0
2013-04-23T18:28:03.312964+00:00 app[web.1]: Started GET "/signup" for 75.68.91.34 at 2013-04-23 18:28:03 +0000
2013-04-23T18:28:03.320889+00:00 app[web.1]: Processing by UsersController#new as HTML
2013-04-23T18:28:03.330931+00:00 app[web.1]:   Rendered shared/_error_messages.html.erb (0.3ms)
2013-04-23T18:28:03.332690+00:00 app[web.1]:   Rendered users/new.html.erb within layouts/application (4.5ms)
2013-04-23T18:28:03.333486+00:00 app[web.1]:   Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:28:03.335702+00:00 app[web.1]:   Rendered layouts/_header.html.erb (2.1ms)
2013-04-23T18:28:03.336140+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:28:03.336258+00:00 app[web.1]: Completed 200 OK in 15ms (Views: 8.2ms | ActiveRecord: 1.0ms)
2013-04-23T18:28:03.343166+00:00 heroku[router]: at=info method=GET path=/signup host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=31ms status=200 bytes=2403
2013-04-23T18:28:23.175897+00:00 app[web.1]: Processing by UsersController#create as HTML
2013-04-23T18:28:23.172784+00:00 app[web.1]: Started POST "/users" for 75.68.91.34 at 2013-04-23 18:28:23 +0000
2013-04-23T18:28:23.175897+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"rdA4wrQvQhEhejI6uTXYg2YZpa5sl7gkYeabVJZQmFA=", "user"=>{"name"=>"Dana Bouchard", "email"=>"dbouchard138@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Create my account"}
2013-04-23T18:28:23.429861+00:00 app[web.1]: Redirected to https://polar-wildwood-1990.herokuapp.com/users/1
2013-04-23T18:28:23.433167+00:00 app[web.1]: Completed 302 Found in 256ms (ActiveRecord: 21.6ms)
2013-04-23T18:28:23.449918+00:00 heroku[router]: at=info method=POST path=/users host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=3ms service=315ms status=302 bytes=115
2013-04-23T18:28:23.497155+00:00 app[web.1]:   Parameters: {"id"=>"1"}
2013-04-23T18:28:23.490244+00:00 app[web.1]: Started GET "/users/1" for 75.68.91.34 at 2013-04-23 18:28:23 +0000
2013-04-23T18:28:23.496980+00:00 app[web.1]: Processing by UsersController#show as HTML
2013-04-23T18:28:23.722402+00:00 app[web.1]:   Rendered shared/_stats.html.erb (54.1ms)
2013-04-23T18:28:23.787319+00:00 app[web.1]:   Rendered users/show.html.erb within layouts/application (120.1ms)
2013-04-23T18:28:23.787319+00:00 app[web.1]: Completed 500 Internal Server Error in 290ms
2013-04-23T18:28:23.789034+00:00 app[web.1]: ActionView::Template::Error (PGError: ERROR:  relation "microposts" does not exist
2013-04-23T18:28:23.789034+00:00 app[web.1]:
2013-04-23T18:28:23.789034+00:00 app[web.1]: LINE 5:              WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789034+00:00 app[web.1]:                                         ^
2013-04-23T18:28:23.789034+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2013-04-23T18:28:23.789034+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2013-04-23T18:28:23.789034+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-04-23T18:28:23.789034+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2013-04-23T18:28:23.789034+00:00 app[web.1]:
 WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789293+00:00 app[web.1]: ):
2013-04-23T18:28:23.789293+00:00 app[web.1]:              ORDER BY a.attnum
2013-04-23T18:28:23.789293+00:00 app[web.1]:     15:     <%= render 'follow_form' if signed_in? %>
2013-04-23T18:28:23.789034+00:00 app[web.1]:                AND a.attnum > 0 AND NOT a.attisdropped
2013-04-23T18:28:23.789293+00:00 app[web.1]:     13:   </aside>
2013-04-23T18:28:23.789293+00:00 app[web.1]:     14:   <div class="span8">
2013-04-23T18:28:23.800620+00:00 heroku[router]: at=info method=GET path=/users/1 host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=313ms status=500 bytes=643
2013-04-23T18:28:23.789293+00:00 app[web.1]:     16:     <% if @user.microposts.any? %>
2013-04-23T18:28:23.789293+00:00 app[web.1]:     17:       <h3>Microposts (<%= @user.microposts.count %>)</h3>
2013-04-23T18:28:23.789293+00:00 app[web.1]:     18:       <ol class="microposts">
2013-04-23T18:28:23.789293+00:00 app[web.1]:     19:         <%= render @microposts %>
2013-04-23T18:28:23.789293+00:00 app[web.1]:   app/views/users/show.html.erb:16:in `_app_views_users_show_html_erb__4534392174835113617_69860797342160'
2013-04-23T18:28:23.789517+00:00 app[web.1]:
2013-04-23T18:28:23.789517+00:00 app[web.1]:
2013-04-23T18:28:38.118917+00:00 heroku[api]: Starting process with command `bundle exec rake db:populate` by dbouchard138@gmail.com
2013-04-23T18:28:40.122057+00:00 heroku[run.9072]: Awaiting client
2013-04-23T18:28:40.141935+00:00 heroku[run.9072]: Starting process with command `bundle exec rake db:populate`
2013-04-23T18:28:41.013463+00:00 heroku[run.9072]: State changed from starting to up
2013-04-23T18:29:06.377140+00:00 heroku[run.9072]: Process exited with status 1
2013-04-23T18:29:06.395386+00:00 heroku[run.9072]: State changed from up to complete
2013-04-23T19:31:08.418618+00:00 heroku[web.1]: Idling
2013-04-23T19:31:11.275801+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-04-23T19:31:12.010696+00:00 app[web.1]:    /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2013-04-23T19:31:12.010696+00:00 app[web.1]: [2013-04-23 19:31:12] ERROR SignalException: SIGTERM
2013-04-23T19:31:22.107373+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2013-04-23T19:31:22.107928+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2013-04-23T19:31:23.892161+00:00 heroku[web.1]: State changed from up to down
2013-04-23T19:31:23.878809+00:00 heroku[web.1]: Process exited with status 137

This is probaly as easy fix, I assume the below is the culpret but I can't figure out why or how to locate the issue.

2013-04-23T18:28:23.789034+00:00 app[web.1]: ActionView::Template::Error (PGError: ERROR:  relation "microposts" does not exist
2013-04-23T18:28:23.789034+00:00 app[web.1]:
2013-04-23T18:28:23.789034+00:00 app[web.1]: LINE 5:              WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789034+00:00 app[web.1]:                                         ^
2013-04-23T18:28:23.789034+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2013-04-23T18:28:23.789034+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2013-04-23T18:28:23.789034+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-04-23T18:28:23.789034+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2013-04-23T18:28:23.789034+00:00 app[web.1]:
 WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789293+00:00 app[web.1]: ):
2013-04-23T18:28:23.789293+00:00 app[web.1]:              ORDER BY a.attnum
2013-04-23T18:28:23.789293+00:00 app[web.1]:     15:     <%= render 'follow_form' if signed_in? %>
2013-04-23T18:28:23.789034+00:00 app[web.1]:                AND a.attnum > 0 AND NOT a.attisdropped
2013-04-23T18:28:23.789293+00:00 app[web.1]:     13:   </aside>
2013-04-23T18:28:23.789293+00:00 app[web.1]:     14:   <div class="span8">
2013-04-23T18:28:23.800620+00:00 heroku[router]: at=info method=GET path=/users/1 host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=313ms status=500 bytes=643
2013-04-23T18:28:23.789293+00:00 app[web.1]:     16:     <% if @user.microposts.any? %>
2013-04-23T18:28:23.789293+00:00 app[web.1]:     17:       <h3>Microposts (<%= @user.microposts.count %>)</h3>
2013-04-23T18:28:23.789293+00:00 app[web.1]:     18:       <ol class="microposts">
2013-04-23T18:28:23.789293+00:00 app[web.1]:     19:         <%= render @microposts %>
2013-04-23T18:28:23.789293+00:00 app[web.1]:   app/views/users/show.html.erb:16:in `_app_views_users_show_html_erb__4534392174835113617_69860797342160'

Please help, if you need any more information let me know. Thank you in advance.

解决方案

Sounds to me like you didn't load the schema into your heroku database. After deploying what happens when you do this:

heroku run rake db:schema:load

Note that sometimes if you're loading up a new app that has an already-established schema, running all the migrations isn't the best way to get the database to the state you want - you should use rake db:schema:load instead. Let me know if this gets your database correct.

After running it you can use heroku run console and then do console commands like User.all to make sure it knows that the users table exists etc.

Don't forget to restart your server after loading the schema, or running db:migrate. For heroku that'd be: heroku restart

这篇关于Hartl的铁轨教程完成了当地完美的作品。 Heroku坚持“我们很抱歉,但出了问题。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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