Heroku ActionView :: Template ::错误预编译错误

时间:2013-01-25 22:45:12

标签: ruby-on-rails heroku twitter-bootstrap twitter-bootstrap-rails

我一直在为我的一个网站争夺这个问题超过一天。我把几个网站推到了Heroku,但是这个网站(在当地工作得很好)不断给我一个“我们很抱歉,但出了点问题。” Heroku上的消息。

当我看到Heroku Logs时,这就是我所看到的:

    2013-01-25T20:29:42+00:00 app[web.1]: => Booting WEBrick
    2013-01-25T20:29:42+00:00 app[web.1]: => Rails 3.2.11 application starting in production on http://0.0.0.0:24385
    2013-01-25T20:29:42+00:00 app[web.1]: => Ctrl-C to shutdown server
    2013-01-25T20:29:42+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
    2013-01-25T20:29:42+00:00 app[web.1]: => Call with -d to detach
    2013-01-25T20:29:42+00:00 app[web.1]: [2013-01-25 20:29:42] INFO  WEBrick 1.3.1
    2013-01-25T20:29:42+00:00 app[web.1]: [2013-01-25 20:29:42] INFO  WEBrick::HTTPServer#start: pid=2 port=24385
    2013-01-25T20:29:42+00:00 app[web.1]: [2013-01-25 20:29:42] INFO  ruby 1.9.2 (2011-07-09) [x86_64-linux]
    2013-01-25T20:29:42+00:00 heroku[web.1]: State changed from starting to up
    2013-01-25T20:29:43+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
    2013-01-25T20:29:43+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
    2013-01-25T20:29:45+00:00 heroku[web.1]: Process exited with status 137
    2013-01-25T20:30:50+00:00 app[web.1]: Started GET "/" for 198.207.185.100 at 2013-01-25 20:30:50 +0000
    2013-01-25T20:30:50+00:00 app[web.1]: Processing by PeopleController#index as HTML
    2013-01-25T20:30:51+00:00 app[web.1]:   Rendered people/index.html.erb within layouts/application (40.2ms)
    2013-01-25T20:30:51+00:00 app[web.1]:   app/views/people/index.html.erb:25:in `_app_views_people_index_html_erb__54318736437858219_34439980'
    2013-01-25T20:30:51+00:00 app[web.1]: Completed 500 Internal Server Error in 299ms
    2013-01-25T20:30:51+00:00 app[web.1]: 
    2013-01-25T20:30:51+00:00 app[web.1]:     37:                                   <button type="button" class="close" data-dismiss="lightbox" aria-hidden="true">&times;</button>
    2013-01-25T20:30:51+00:00 app[web.1]:     42:                           </div>
    2013-01-25T20:30:51+00:00 app[web.1]: ActionView::Template::Error ( isn't precompiled):
    2013-01-25T20:30:51+00:00 app[web.1]:     38:                               </div>
    2013-01-25T20:30:51+00:00 app[web.1]:     39:                               <div class='lightbox-content'>
    2013-01-25T20:30:51+00:00 app[web.1]:   app/views/people/index.html.erb:40:in `block in _app_views_people_index_html_erb__54318736437858219_34439980'
    2013-01-25T20:30:51+00:00 app[web.1]:     40:                                   <%=image_tag person.map %>
    2013-01-25T20:30:51+00:00 app[web.1]:     43:                           <!-- end lightbox code -->
    2013-01-25T20:30:51+00:00 app[web.1]:   app/controllers/people_controller.rb:7:in `index'
    2013-01-25T20:30:51+00:00 app[web.1]:   app/views/people/index.html.erb:25:in `each'
    2013-01-25T20:30:51+00:00 app[web.1]: 
    2013-01-25T20:30:51+00:00 app[web.1]: 
    2013-01-25T20:30:51+00:00 app[web.1]:     41:                               </div>

我上面看到的关键问题是“ActionView :: Template :: Error”

我跑了

RAILS_ENV=production bundle exec rake assets:precompile 

多次编译我的资产。 (包括删除我的公共资产目录的内容。

我已经读过twitter-bootstrap-rails gem应该移出我的Gemfile的Assets部分,所以我移动了它并删除了我的Gemfile.lock并运行bundle update。

我还通过运行

重新安装了twitter-bootstrap-rails
rails g bootstrap:install

我还确保application.css文件有

*= require bootstrap_and_overrides

以上

*= require_tree .

我真的很难过。有没有人对我能做些什么来解决这个问题?

1 个答案:

答案 0 :(得分:0)

尝试转到config/environments/production.rb并将此行从false更改为true:

  # Don't fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true

添加,提交和推送更改。