2012-08-12 89 views
0

所以即时通过heroku部署我的代码的过程中,但最近遇到'很抱歉,但出了问题'错误时去网站。不完全确定这个问题的原因回去了,并尝试使用'heroku rake db:reset command'(这可能不是逐字的),但是我有点困惑于解决这个问题该怎么做。关于heroku部署的错误

2012-08-11T23:30:00+00:00 heroku[run.1]: Awaiting client 
    2012-08-11T23:30:00+00:00 heroku[run.1]: Starting process with command `bundle exec         rake db:rollback` 
    2012-08-11T23:30:01+00:00 heroku[run.1]: State changed from starting to up 
    2012-08-11T23:30:06+00:00 heroku[run.1]: Process exited with status 0 
    2012-08-11T23:30:06+00:00 heroku[run.1]: State changed from up to complete 
    2012-08-11T23:30:17+00:00 heroku[run.1]: Awaiting client 
    2012-08-11T23:30:17+00:00 heroku[run.1]: Starting process with command `bundle exec   rake db:migrate` 
    2012-08-11T23:30:17+00:00 heroku[run.1]: State changed from starting to up 
    2012-08-11T23:30:26+00:00 heroku[run.1]: Process exited with status 1 
    2012-08-11T23:30:26+00:00 heroku[run.1]: State changed from up to complete 
    2012-08-11T23:32:07+00:00 heroku[run.1]: Awaiting client 
    2012-08-11T23:32:07+00:00 heroku[run.1]: Starting process with command `bundle exec rake db:migrate` 
    2012-08-11T23:32:07+00:00 heroku[run.1]: State changed from starting to up 
    2012-08-11T23:32:15+00:00 heroku[run.1]: Process exited with status 1 
    2012-08-11T23:32:15+00:00 heroku[run.1]: State changed from up to complete 
    2012-08-11T23:32:53+00:00 heroku[run.1]: Awaiting client 
    2012-08-11T23:32:53+00:00 heroku[run.1]: Starting process with command `bundle exec rake db:migrate` 
    2012-08-11T23:32:54+00:00 heroku[run.1]: State changed from starting to up 
    2012-08-11T23:33:00+00:00 heroku[run.1]: Process exited with status 1 
    2012-08-11T23:33:00+00:00 heroku[run.1]: State changed from up to complete 
    2012-08-11T23:35:36+00:00 heroku[run.1]: Awaiting client 
    2012-08-11T23:35:36+00:00 heroku[run.1]: Starting process with command `bundle exec rake db:reset` 
    2012-08-11T23:35:37+00:00 heroku[run.1]: State changed from starting to up 
    2012-08-11T23:35:52+00:00 heroku[run.1]: Process exited with status 0 
    2012-08-11T23:35:52+00:00 heroku[run.1]: State changed from up to complete 
    2012-08-11T23:36:05+00:00 heroku[run.1]: Starting process with command `bundle exec rake db:migrate` 
    2012-08-11T23:36:05+00:00 heroku[run.1]: Awaiting client 
    2012-08-11T23:36:05+00:00 heroku[run.1]: State changed from starting to up 
    2012-08-11T23:36:17+00:00 heroku[run.1]: Process exited with status 0 
    2012-08-11T23:36:17+00:00 heroku[run.1]: State changed from up to complete 
    2012-08-11T23:37:07+00:00 app[web.1]: 
    2012-08-11T23:37:07+00:00 app[web.1]: 
    2012-08-11T23:37:07+00:00 app[web.1]: Started GET "/" for 71.201.189.216 at 2012-08-11   23:37:07 +0000 
    2012-08-11T23:37:07+00:00 app[web.1]: Processing by MainController#home as HTML 
    2012-08-11T23:37:07+00:00 app[web.1]: Rendered main/home.html.erb within layouts/application (1.2ms) 
    2012-08-11T23:37:08+00:00 app[web.1]: Completed 500 Internal Server Error in 671ms 
    2012-08-11T23:37:08+00:00 app[web.1]: 
    2012-08-11T23:37:08+00:00 app[web.1]: ActionView::Template::Error (Unexpected token   name, expected punc (line: 10703, col: 9, pos: 383443) 
    2012-08-11T23:37:08+00:00 app[web.1]: 
    2012-08-11T23:37:08+00:00 app[web.1]: Error 
    2012-08-11T23:37:08+00:00 app[web.1]:  at new JS_Parse_Error (/tmp/execjs20120811-2-2siv6i.js:3096:22) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at js_error (/tmp/execjs20120811-2-2siv6i.js:3104:15) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at token_error (/tmp/execjs20120811-2-2siv6i.js:3564:17) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at croak (/tmp/execjs20120811-2-2siv6i.js:3557:17) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at expect_token (/tmp/execjs20120811-2-2siv6i.js:3577:17) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at expect (/tmp/execjs20120811-2-2siv6i.js:3580:40) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at object_ (/tmp/execjs20120811-2-2siv6i.js:3968:56) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at /tmp/execjs20120811-2-2siv6i.js:3929:51 
    2012-08-11T23:37:08+00:00 app[web.1]:  at maybe_unary (/tmp/execjs20120811-2-2siv6i.js:4028:27) 
    2012-08-11T23:37:08+00:00 app[web.1]:  at expr_ops (/tmp/execjs20120811-2-2siv6i.js:4055:32) 
    2012-08-11T23:37:08+00:00 app[web.1]: (in /app/app/assets/javascripts/application.js)): 
    2012-08-11T23:37:08+00:00 app[web.1]:  26: 
    2012-08-11T23:37:08+00:00 app[web.1]:  25: <title>Live Well Chicago L.L.C</title> 
    2012-08-11T23:37:08+00:00 app[web.1]:  27: <%= stylesheet_link_tag "application", :media => "all" %> 
    2012-08-11T23:37:08+00:00 app[web.1]:  28: <%= javascript_include_tag "application" %> 
    2012-08-11T23:37:08+00:00 app[web.1]:  30: </head> 
    2012-08-11T23:37:08+00:00 app[web.1]:  29: <%= csrf_meta_tags %> 
    2012-08-11T23:37:08+00:00 app[web.1]:  31: <body><br /> 
    2012-08-11T23:37:08+00:00 app[web.1]: app/views/layouts/application.html.erb:28:in `_app_views_layouts_application_html_erb___3454440193923948893_37164960' 
    2012-08-11T23:37:08+00:00 app[web.1]: 
    2012-08-11T23:37:08+00:00 app[web.1]: 
    2012-08-11T23:37:08+00:00 heroku[router]: GET smooth-dusk-9878.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=680ms status=500 bytes=643 
    2012-08-11T23:37:08+00:00 heroku[router]: GET smooth-dusk-9878.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=4ms status=304 bytes=0 
    2012-08-11T23:37:10+00:00 app[web.1]: 
    2012-08-11T23:37:10+00:00 app[web.1]: 
    2012-08-11T23:37:10+00:00 app[web.1]: Started GET "/" for 71.201.189.216 at 2012-08-11 23:37:10 +0000 
    2012-08-11T23:37:10+00:00 app[web.1]: Processing by MainController#home as HTML 
    2012-08-11T23:37:10+00:00 app[web.1]: Rendered main/home.html.erb within layouts/application (1.4ms) 
    2012-08-11T23:37:11+00:00 app[web.1]: Completed 500 Internal Server Error in 723ms 
    2012-08-11T23:37:11+00:00 app[web.1]: 
    2012-08-11T23:37:11+00:00 app[web.1]: ActionView::Template::Error (Unexpected token name, expected punc (line: 10703, col: 9, pos: 383443) 
    2012-08-11T23:37:11+00:00 app[web.1]: 
    2012-08-11T23:37:11+00:00 app[web.1]: Error 
    2012-08-11T23:37:11+00:00 app[web.1]:  at new JS_Parse_Error (/tmp/execjs20120811-2-1und2hm.js:3096:22) 
    2012-08-11T23:37:11+00:00 app[web.1]:  at croak (/tmp/execjs20120811-2-1und2hm.js:3557:17) 
    2012-08-11T23:37:11+00:00 app[web.1]:  at js_error (/tmp/execjs20120811-2-1und2hm.js:3104:15) 
    2012-08-11T23:37:11+00:00 app[web.1]:  at expect_token (/tmp/execjs20120811-2-1und2hm.js:3577:17) 
    2012-08-11T23:37:11+00:00 app[web.1]:  at token_error (/tmp/execjs20120811-2-1und2hm.js:3564:17) 
    2012-08-11T23:37:11+00:00 app[web.1]:  at object_ (/tmp/execjs20120811-2-1und2hm.js:3968:56) 
    2012-08-11T23:37:11+00:00 app[web.1]:  at expect (/tmp/execjs20120811-2-1und2hm.js:3580:40) 
    2012-08-11T23:37:11+00:00 app[web.1]:  at /tmp/execjs20120811-2-1und2hm.js:3929:51 
    2012-08-11T23:37:11+00:00 app[web.1]:  at maybe_unary (/tmp/execjs20120811-2-1und2hm.js:4028:27) 
    2012-08-11T23:37:11+00:00 app[web.1]: (in /app/app/assets/javascripts/application.js)): 
    2012-08-11T23:37:11+00:00 app[web.1]:  at expr_ops (/tmp/execjs20120811-2-  1und2hm.js:4055:32) 
    2012-08-11T23:37:11+00:00 app[web.1]:  25: <title>Live Well Chicago L.L.C</title> 
    2012-08-11T23:37:11+00:00 app[web.1]:  26: 
    2012-08-11T23:37:11+00:00 app[web.1]:  27: <%= stylesheet_link_tag "application", :media => "all" %> 
    2012-08-11T23:37:11+00:00 app[web.1]:  28: <%= javascript_include_tag "application" %> 
    2012-08-11T23:37:11+00:00 app[web.1]:  29: <%= csrf_meta_tags %> 
    2012-08-11T23:37:11+00:00 app[web.1]:  30: </head> 
    2012-08-11T23:37:11+00:00 app[web.1]:  31: <body><br /> 
    2012-08-11T23:37:11+00:00 app[web.1]: app/views/layouts/application.html.erb:28:in `_app_views_layouts_application_html_erb___3454440193923948893_37164960' 
    2012-08-11T23:37:11+00:00 app[web.1]: 
    2012-08-11T23:37:11+00:00 app[web.1]: 
    2012-08-11T23:37:11+00:00 heroku[router]: GET smooth-dusk-9878.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=734ms status=500 bytes=643 
    2012-08-11T23:37:11+00:00 heroku[router]: GET smooth-dusk-9878.herokuapp.com/favicon.ico   dyno=web.1 queue=0 wait=0ms service=5ms status=304 bytes=0 
    2012-08-11T23:37:25+00:00 heroku[run.1]: Awaiting client 
    2012-08-11T23:37:25+00:00 heroku[run.1]: Starting process with command `bundle exec rake db:migrate` 
    2012-08-11T23:37:26+00:00 heroku[run.1]: State changed from starting to up 
    2012-08-11T23:37:32+00:00 heroku[run.1]: Process exited with status 0 
    2012-08-11T23:37:32+00:00 heroku[run.1]: State changed from up to complete 
+0

那么,在日志中注明的行和位置是什么:'ActionView :: Template :: Error(Unexpected token name,expected punc(line:10703,col:9,pos:383443)'?另外,日志显示你运行的命令 - 你也可以从你的命令历史记录中获得它 – jefflunt 2012-08-12 00:37:30

+0

normalocity:我一直试图自己弄清楚,但是我有点困惑,因为它没有直接说明错误出现在哪个文件中。我认为由于模板错误,它来自application.html.erb文件,但该文件甚至不足以存在10000行,所以它留给我有点困惑。命令历史 – sonobenissimo 2012-08-12 19:17:37

+0

事实证明,预编译错误可能来自js文件的注释 – ajon 2013-03-27 00:40:13

回答

1

您的JavaScript文件中有语法错误吗?在部署到heroku时,它是否显示在部署期间无法预编译资产?

+0

乔尔:我不认为我虽然我确实认为,在完成(http://excid3.com/blog/heroku-actionviewtemplateerror-css-isnt-precompiled/)的建议后,我没有预编译我的资产,但我不认为这是是问题的根源,尽管我可能是错的。 – sonobenissimo 2012-08-12 19:14:43

+0

我无法理解日志,但试验和错误可能会对您有所帮助。你可以从application.js中删除所有内容并重试吗?看看JavaScript是否影响它? – 2012-08-12 23:32:49

+0

嘿设法得到它并运行它必须与application.js做不完全确定究竟是什么问题,但与/ = require_tree。该行自动包含在文件的开头。然而,我仍然没有真正理解它是如何导致问题看到,因为它已被注释掉,但似乎删除它能够解决这个问题,并且大部分网站现在正在运行。感谢您的帮助,虽然我非常专注于尝试寻找解决方案,但我忘记了一些试验和错误。 – sonobenissimo 2012-08-13 23:33:38