2

一天多来,我一直在为我的一个网站解决这个问题。我已经将几个站点推送到 Heroku,但是这个(在本地运行良好)经常给我一个“我们很抱歉,但是出了点问题”。Heroku 上的消息。

当我查看 Heroku 日志时,我看到的是:

    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 并运行包更新。

我还通过运行重新安装了 twitter-bootstrap-rails

rails g bootstrap:install

我还确保 application.css 文件有

*= require bootstrap_and_overrides

以上

*= require_tree .

我真的很难过。有人对我能做些什么来解决这个问题有任何想法吗?

4

1 回答 1

0

尝试config/environments/production.rb将这一行从 false 更改为 true:

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

添加、提交和推送更改。

于 2013-01-30T21:57:55.213 回答