Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 希罗库很抱歉,但出了点问题_Ruby On Rails_Heroku - Fatal编程技术网

Ruby on rails 希罗库很抱歉,但出了点问题

Ruby on rails 希罗库很抱歉,但出了点问题,ruby-on-rails,heroku,Ruby On Rails,Heroku,我试图从heroku进入我的应用程序的另一个页面,但我不能,因为它说我们很抱歉,但出了问题 这是我的heroku日志里的东西 2014-02-13T18:58:20.617640+00:00 heroku[router]: at=info method=GET path=/ host=whispering-shore-8429.herokuapp.com request_id=0ea ebe7-bea5-417b-b371-462a071c2f45 fwd="68.55.131.71" dyno

我试图从heroku进入我的应用程序的另一个页面,但我不能,因为它说我们很抱歉,但出了问题

这是我的heroku日志里的东西

2014-02-13T18:58:20.617640+00:00 heroku[router]: at=info method=GET path=/ host=whispering-shore-8429.herokuapp.com request_id=0ea
ebe7-bea5-417b-b371-462a071c2f45 fwd="68.55.131.71" dyno=web.1 connect=1ms service=229ms status=304 bytes=0
2014-02-13T18:58:20.762361+00:00 heroku[router]: at=info method=GET path=/assets/application-ec238357b2bb2d82a5fd2c7675f7d5ea.css
ost=whispering-shore-8429.herokuapp.com request_id=4de97dca-391d-4181-a4fa-f2c0fdeb2203 fwd="68.55.131.71" dyno=web.1 connect=1ms
ervice=9ms status=304 bytes=0
2014-02-13T19:02:22.251866+00:00 app[web.1]: Started GET "/live_players" for 68.55.131.71 at 2014-02-13 19:02:22 +0000
2014-02-13T19:02:22.253790+00:00 app[web.1]: Processing by LivePlayersController#index as HTML
2014-02-13T19:02:22.251866+00:00 app[web.1]: Started GET "/live_players" for 68.55.131.71 at 2014-02-13 19:02:22 +0000
2014-02-13T19:02:22.253790+00:00 app[web.1]: Processing by LivePlayersController#index as HTML
2014-02-13T19:02:26.441393+00:00 app[web.1]: PG::Error: ERROR:  column "team" does not exist
2014-02-13T19:02:26.441393+00:00 app[web.1]: LINE 1: SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T19:02:26.441393+00:00 app[web.1]:                                                    ^
2014-02-13T19:02:26.441393+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T19:02:26.441393+00:00 app[web.1]: LINE 1: SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T19:02:26.441393+00:00 app[web.1]: PG::Error: ERROR:  column "team" does not exist
2014-02-13T19:02:26.453212+00:00 app[web.1]:   Rendered live_players/index.html.erb within layouts/application (18.3ms)
2014-02-13T19:02:26.455611+00:00 app[web.1]:
2014-02-13T19:02:26.441393+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T19:02:26.455611+00:00 app[web.1]: ActionView::Template::Error (PG::Error: ERROR:  column "team" does not exist
2014-02-13T19:02:26.453456+00:00 app[web.1]: Completed 500 Internal Server Error in 4200ms
2014-02-13T19:02:26.453456+00:00 app[web.1]: Completed 500 Internal Server Error in 4200ms
2014-02-13T19:02:26.453212+00:00 app[web.1]:   Rendered live_players/index.html.erb within layouts/application (18.3ms)
2014-02-13T19:02:26.455611+00:00 app[web.1]:                                                    ^
2014-02-13T19:02:26.441393+00:00 app[web.1]:                                                    ^
2014-02-13T19:02:26.455611+00:00 app[web.1]: LINE 1: SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T19:02:26.455800+00:00 app[web.1]:     11:    <% end %>
2014-02-13T19:02:26.455611+00:00 app[web.1]:     10:            <option><%= abbrv.Team %></option>
2014-02-13T19:02:26.455611+00:00 app[web.1]:      9:    <% Abbrv.order("Team").each do |abbrv| %>
2014-02-13T19:02:26.455800+00:00 app[web.1]:     12: </select>
2014-02-13T19:02:26.455800+00:00 app[web.1]:
2014-02-13T19:02:26.455611+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team):
2014-02-13T19:02:26.455611+00:00 app[web.1]:      6:
2014-02-13T19:02:26.455800+00:00 app[web.1]:   app/views/live_players/index.html.erb:9:in `_app_views_live_players_index_html_erb_
_2359354532860974770_70257406404860'
2014-02-13T19:02:26.455611+00:00 app[web.1]:      7: <select id = "FilterTm">
2014-02-13T19:02:26.455611+00:00 app[web.1]:      8:            <option>Select a Team...</option>
2014-02-13T19:02:26.455800+00:00 app[web.1]: ActionView::Template::Error (PG::Error: ERROR:  column "team" does not exist
2014-02-13T19:02:26.455800+00:00 app[web.1]:                                                    ^
2014-02-13T19:02:26.455800+00:00 app[web.1]:
2014-02-13T19:02:26.455800+00:00 app[web.1]:
2014-02-13T19:02:26.455976+00:00 app[web.1]:      7: <select id = "FilterTm">
2014-02-13T19:02:26.455976+00:00 app[web.1]:      6:
2014-02-13T19:02:26.455976+00:00 app[web.1]:     11:    <% end %>
2014-02-13T19:02:26.455976+00:00 app[web.1]:     12: </select>
2014-02-13T19:02:26.455976+00:00 app[web.1]:
2014-02-13T19:02:26.455976+00:00 app[web.1]:
2014-02-13T19:02:26.455800+00:00 app[web.1]: LINE 1: SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T19:02:26.455976+00:00 app[web.1]:   app/views/live_players/index.html.erb:9:in `_app_views_live_players_index_html_erb_
_2359354532860974770_70257406404860'
2014-02-13T19:02:26.455800+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team):
2014-02-13T19:02:26.455976+00:00 app[web.1]:      9:    <% Abbrv.order("Team").each do |abbrv| %>
2014-02-13T19:02:26.455976+00:00 app[web.1]:      8:            <option>Select a Team...</option>
2014-02-13T19:02:26.455976+00:00 app[web.1]:     10:            <option><%= abbrv.Team %></option>
现在我注意到is说“团队”栏不存在,但事实并非如此。这是我的页面:

<h1>Listing All Players</h1>

<div id="progressbar"><div class="progress-label">Loading...</div></div>

<a id="playerBtn"><button type="button" id="plyrBtn">Players</button></a>

<select id = "FilterTm">
    <option>Select a Team...</option>
<% Abbrv.order("Team").each do |abbrv| %>
    <option><%= abbrv.Team %></option>
<% end %>
</select>

<%#= link_to '<button type = "button">Players</button>'.html_safe, live_players_path(:Team => @tmf) %>


<br />


<br />
<input type="text" class="hiddenField" id="curTeam" style="border:none;" />

<select id = "ptable" size = 30>
<% @live_players.each do |live_player| %>
    <option><%= live_player.Plyr %></option>
<% end %>
</select>
这是它试图获取的页面。现在,这是我的路由文件:

TestfflApp::Application.routes.draw do

root "static_pages#home"

get "static_pages/Add_team"

resources :teamplayers

resources :fteams

resources :abbrvs

resources :live_players

get 'live_players', to: 'live_players#index' << Routed page
所以我在这里看了一下,对类似的问题做了所有的建议,那么我有什么问题呢

更新

下面是heroku日志现在所说的:

`2014-02-13T20:37:48.237162+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-02-13T20:37:56.719387+00:00 app[web.1]: Processing by LivePlayersController#index as HTML
2014-02-13T20:37:56.717608+00:00 app[web.1]: Started GET "/live_players" for 68.55.131.71 at 2014-02-13 20:37:56 +0000
2014-02-13T20:37:56.717608+00:00 app[web.1]: Started GET "/live_players" for 68.55.131.71 at 2014-02-13 20:37:56 +0000
2014-02-13T20:37:56.719387+00:00 app[web.1]: Processing by LivePlayersController#index as HTML
2014-02-13T20:38:00.089740+00:00 app[web.1]: PG::Error: FATAL:  terminating connection due to administrator command
2014-02-13T20:38:00.089740+00:00 app[web.1]: SSL connection has been closed unexpectedly
2014-02-13T20:38:00.089740+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T20:38:00.089740+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team
2014-02-13T20:38:00.089740+00:00 app[web.1]: PG::Error: FATAL:  terminating connection due to administrator command
2014-02-13T20:38:00.091753+00:00 app[web.1]:   Rendered live_players/index.html.erb within layouts/application (4.7ms)
2014-02-13T20:38:00.092187+00:00 app[web.1]: Completed 500 Internal Server Error in 3373ms
2014-02-13T20:38:00.096530+00:00 app[web.1]:
2014-02-13T20:38:00.096530+00:00 app[web.1]: ActionView::Template::Error (PG::Error: FATAL:  terminating connection due to administrator command
2014-02-13T20:38:00.096530+00:00 app[web.1]: SSL connection has been closed unexpectedly
2014-02-13T20:38:00.096530+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team):
2014-02-13T20:38:00.096530+00:00 app[web.1]:      9:    <% Abbrv.order("Team").each do |abbrv| %>
2014-02-13T20:38:00.089740+00:00 app[web.1]: SSL connection has been closed unexpectedly
2014-02-13T20:38:00.096530+00:00 app[web.1]:      7: <select id = "FilterTm">
2014-02-13T20:38:00.096530+00:00 app[web.1]:     10:            <option><%= abbrv.Team %></option>
2014-02-13T20:38:00.096530+00:00 app[web.1]:     11:    <% end %>
2014-02-13T20:38:00.096859+00:00 app[web.1]:     12: </select>
  2014-02-13T20:38:00.096859+00:00 app[web.1]: ActionView::Template::Error (PG::Error:  FATAL:  terminating connection due to administrator command
2014-02-13T20:38:00.096859+00:00 app[web.1]: SSL connection has been closed unexpectedly
2014-02-13T20:38:00.096530+00:00 app[web.1]:      8:            <option>Select a Team...</option>
2014-02-13T20:38:00.096859+00:00 app[web.1]:   app/views/live_players/index.html.erb:9:in `_app_views_live_players_index_html_erb__
2392315387062206729_69827916979320'
2014-02-13T20:38:00.096859+00:00 app[web.1]:
2014-02-13T20:38:00.096859+00:00 app[web.1]:
2014-02-13T20:38:00.091873+00:00 app[web.1]:   Rendered live_players/index.html.erb within layouts/application (4.7ms)
2014-02-13T20:38:00.096859+00:00 app[web.1]: : SELECT "abbrvs".* FROM "abbrvs"   ORDER BY Team):
2014-02-13T20:38:00.096859+00:00 app[web.1]:      6:
2014-02-13T20:38:00.096859+00:00 app[web.1]:      7: <select id = "FilterTm">
2014-02-13T20:38:00.097200+00:00 app[web.1]:      8:            <option>Select a Team...</option>
2014-02-13T20:38:00.097200+00:00 app[web.1]:      9:    <% Abbrv.order("Team").each do |abbrv| %>
2014-02-13T20:38:00.097200+00:00 app[web.1]:     10:            <option><%= abbrv.Team %></option>
2014-02-13T20:38:00.097200+00:00 app[web.1]:     11:    <% end %>
2014-02-13T20:38:00.096859+00:00 app[web.1]:
2014-02-13T20:38:00.092187+00:00 app[web.1]: Completed 500 Internal Server Error in 3373ms
2014-02-13T20:38:00.097200+00:00 app[web.1]:   app/views/live_players/index.html.erb:9:in `_app_views_live_players_index_html_erb__
2392315387062206729_69827916979320'
2014-02-13T20:38:00.097200+00:00 app[web.1]:
2014-02-13T20:38:00.097200+00:00 app[web.1]:
2014-02-13T20:38:00.097200+00:00 app[web.1]:     12: </select>
2014-02-13T20:38:00.096530+00:00 app[web.1]:      6:
2014-02-13T20:37:47.810030+00:00 heroku[router]: at=info method=GET path=/ host=whispering-shore-8429.herokuapp.com request_id=a91b
2a9e-24c1-4481-a973-e6385393035f fwd="68.55.131.71" dyno=web.1 connect=30ms service=113ms status=304 bytes=0
2014-02-13T20:38:00.106578+00:00 heroku[router]: at=info method=GET path=/live_players host=whispering-shore-8429.herokuapp.com request_id=a8c5e9d7-bac5-4058-87d0-497330b5c4dd fwd="68.55.131.71" dyno=web.1 connect=6ms service=3399ms status=500 bytes=1266`
这是您的错误:

ActionView::Template::Error (PG::Error: ERROR:  column "team" does not exist...
我猜你用迁移更新了数据库,但没有在Heroku上进行迁移。只需从控制台运行以下命令

heroku run rake db:migrate

这应该可以修复您的错误。

您可以发布模型及其属性的列表吗?好的,修复了该错误,但现在有一个新的错误,它出现在我发布的更新中。此消息表示后端连接已终止。当用户从命令行客户端发出pg:kill,或类似地运行SELECT pg_cancel_backendpid时,就会发生这种情况;来自psql会话。您是否运行迁移并等待迁移完成?对,然后发生了什么?迁移是否正常运行?你能在Heroku上访问你的应用程序吗?页面刷新有效吗?是否有其他人发出了数据库命令?是的,它运行时没有错误,是的,我可以访问应用程序,但只有带有的主页是静态页面。页面刷新仅在主页上有效。没有人发出命令。每次你转到另一个页面时,你的日志是否仍显示相同的错误?我这样问是因为Heroku上的错误通常是由维护引起的。