1

我的应用程序在本地运行良好,甚至在今天早上早些时候,我还能够让它在 Heroku 中显示。然而,现在它已经完成了,我收到了那个讨厌的信息!

这是 Heroku 日志。我不确定如何解决它:

2012-11-20T19:49:33+00:00 app[web.1]: 
2012-11-20T19:49:33+00:00 app[web.1]:   app/views/layouts/application.html.erb:19:in  `_app_views_layouts_application_html_erb__4485189738011654672_31063660'
2012-11-20T19:49:33+00:00 app[web.1]: 
 2012-11-20T19:49:33+00:00 app[web.1]: 
 2012-11-20T19:49:33+00:00 app[web.1]: Processing by PagesController#home as HTML
 2012-11-20T19:50:03+00:00 app[web.1]: ActionView::Template::Error (images/apple-touch-    icon- 144x144-precomposed.png isn't precompiled):
2012-11-20T19:50:03+00:00 app[web.1]: 
2012-11-20T19:50:03+00:00 app[web.1]: 
 2012-11-20T19:50:03+00:00 app[web.1]: 
2012-11-20T19:50:03+00:00 app[web.1]:     21:     <!-- For iPhone with high-resolution Retina  display: -->
2012-11-20T19:50:03+00:00 app[web.1]: 
2012-11-20T19:50:03+00:00 app[web.1]:     19:     <%= favicon_link_tag 'images/apple-touch- icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png',  :sizes => '144x144' %>
2012-11-20T19:50:03+00:00 app[web.1]:     22:     <!-- Size should be 114 x 114 pixels -->
2012-11-20T19:50:03+00:00 app[web.1]:     17:     <!-- For third-generation iPad with high-resolution Retina display: -->
2012-11-20T19:50:03+00:00 app[web.1]:     18:     <!-- Size should be 144 x 144 pixels -->
2012-11-20T19:50:03+00:00 app[web.1]:     20: 
2012-11-20T19:50:03+00:00 app[web.1]:   app/views/layouts/application.html.erb:19:in  `_app_views_layouts_application_html_erb__4485189738011654672_31063660'
2012-11-20T19:50:03+00:00 app[web.1]: 
2012-11-20T19:50:03+00:00 app[web.1]: Started GET "/" for 66.25.149.26 at 2012-11-20 19:50:03  +0000
2012-11-20T19:50:03+00:00 app[web.1]: Processing by PagesController#home as HTML
2012-11-20T19:50:03+00:00 app[web.1]:   Rendered pages/home.html.erb within  layouts/application (0.3ms)
2012-11-20T19:50:03+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-11-20T19:50:03+00:00 app[web.1]:     16: 
2012-11-20T19:50:08+00:00 heroku[router]: at=info method=GET path=/  host=thenewoutfitproject.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=2ms service=28ms status=500 bytes=643
2012-11-20T19:50:31+00:00 heroku[router]: at=info method=GET path=/ host=thenewoutfitproject.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=6ms service=9ms status=500 bytes=643
2012-11-20T19:50:31+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (0.2ms)
2012-11-20T19:50:31+00:00 app[web.1]: 
2012-11-20T19:50:31+00:00 app[web.1]: 
2012-11-20T19:50:31+00:00 app[web.1]:     20: 
2012-11-20T19:50:31+00:00 app[web.1]: 
2012-11-20T19:50:31+00:00 app[web.1]:     18:     <!-- Size should be 144 x 144 pixels -->
2012-11-20T19:50:31+00:00 app[web.1]: 
2012-11-20T19:50:31+00:00 app[web.1]:     21:     <!-- For iPhone with high-resolution Retina display: -->
2012-11-20T19:50:31+00:00 app[web.1]: Processing by PagesController#home as HTML
2012-11-20T19:50:31+00:00 app[web.1]: Started GET "/" for 66.25.149.26 at 2012-11-20 19:50:31 +0000
2012-11-20T19:50:31+00:00 app[web.1]:     17:     <!-- For third-generation iPad with high-resolution Retina display: -->
2012-11-20T19:50:31+00:00 app[web.1]: ActionView::Template::Error (images/apple-touch-icon-144x144-precomposed.png isn't precompiled):
2012-11-20T19:50:31+00:00 app[web.1]:     16: 
2012-11-20T19:50:31+00:00 app[web.1]:   app/views/layouts/application.html.erb:19:in `_app_views_layouts_application_html_erb__4485189738011654672_31063660'
2012-11-20T19:50:31+00:00 app[web.1]: Completed 500 Internal Server Error in 1ms
2012-11-20T19:50:31+00:00 app[web.1]:     22:     <!-- Size should be 114 x 114 pixels -->
2012-11-20T19:50:31+00:00 app[web.1]:     19:     <%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
2012-11-20T19:50:31+00:00 app[web.1]: 
2012-11-20T19:54:14+00:00 heroku[router]: at=info method=GET path=/ host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=8ms status=500 bytes=643
2012-11-20T19:54:14+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-11-20T19:54:14+00:00 app[web.1]:     16: 
2012-11-20T19:54:14+00:00 app[web.1]:     17:     <!-- For third-generation iPad with high-resolution Retina display: -->
2012-11-20T19:54:14+00:00 app[web.1]: 
2012-11-20T19:54:14+00:00 app[web.1]: 
2012-11-20T19:54:14+00:00 app[web.1]: ActionView::Template::Error (images/apple-touch-icon-144x144-precomposed.png isn't precompiled):
2012-11-20T19:54:14+00:00 app[web.1]:     21:     <!-- For iPhone with high-resolution Retina display: -->
2012-11-20T19:54:14+00:00 app[web.1]: 
2012-11-20T19:54:14+00:00 app[web.1]:     20: 
2012-11-20T19:54:14+00:00 app[web.1]: Started GET "/" for 66.25.149.26 at 2012-11-20 19:54:14 +0000
2012-11-20T19:54:14+00:00 app[web.1]: Processing by PagesController#home as HTML
2012-11-20T19:54:14+00:00 app[web.1]:     22:     <!-- Size should be 114 x 114 pixels -->
2012-11-20T19:54:14+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (0.2ms)
2012-11-20T19:54:14+00:00 app[web.1]:     18:     <!-- Size should be 144 x 144 pixels -->
2012-11-20T19:54:14+00:00 app[web.1]:     19:     <%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
2012-11-20T19:54:14+00:00 app[web.1]: 
2012-11-20T19:54:14+00:00 app[web.1]:   app/views/layouts/application.html.erb:19:in `_app_views_layouts_application_html_erb__4485189738011654672_31063660'
2012-11-20T19:54:14+00:00 app[web.1]: 
2012-11-20T19:54:14+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=8ms status=200 bytes=0
2012-11-20T19:55:36+00:00 app[web.1]:     16: 
2012-11-20T19:55:36+00:00 heroku[router]: at=info method=GET path=/ host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=7ms connect=32ms service=80ms status=500 bytes=643
2012-11-20T19:55:36+00:00 app[web.1]: 
2012-11-20T19:55:36+00:00 app[web.1]:     18:     <!-- Size should be 144 x 144 pixels -->
2012-11-20T19:55:36+00:00 app[web.1]:     21:     <!-- For iPhone with high-resolution Retina display: -->
2012-11-20T19:55:36+00:00 app[web.1]: Processing by PagesController#home as HTML
2012-11-20T19:55:36+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (0.2ms)
2012-11-20T19:55:36+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-11-20T19:55:36+00:00 app[web.1]: 
2012-11-20T19:55:36+00:00 app[web.1]: ActionView::Template::Error (images/apple-touch-icon-144x144-precomposed.png isn't precompiled):
2012-11-20T19:55:36+00:00 app[web.1]:   app/views/layouts/application.html.erb:19:in `_app_views_layouts_application_html_erb__4485189738011654672_31063660'
2012-11-20T19:55:36+00:00 app[web.1]:     22:     <!-- Size should be 114 x 114 pixels -->
2012-11-20T19:55:36+00:00 app[web.1]: Started GET "/" for 66.25.149.26 at 2012-11-20 19:55:36 +0000
2012-11-20T19:55:36+00:00 app[web.1]: 
2012-11-20T19:55:36+00:00 app[web.1]:     19:     <%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
2012-11-20T19:55:36+00:00 app[web.1]:     20: 
2012-11-20T19:55:36+00:00 app[web.1]: 
2012-11-20T19:55:36+00:00 app[web.1]:     17:     <!-- For third-generation iPad with high-resolution Retina display: -->
2012-11-20T19:55:36+00:00 app[web.1]: 
2012-11-20T19:59:39+00:00 heroku[router]: at=info method=GET path=/ host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=9ms status=500 bytes=643
2012-11-20T19:59:39+00:00 app[web.1]: 
2012-11-20T19:59:39+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (0.2ms)
2012-11-20T19:59:39+00:00 app[web.1]: 
2012-11-20T19:59:39+00:00 app[web.1]:     17:     <!-- For third-generation iPad with high-resolution Retina display: -->
2012-11-20T19:59:39+00:00 app[web.1]: 
2012-11-20T19:59:39+00:00 app[web.1]: Started GET "/" for 66.25.149.26 at 2012-11-20 19:59:39 +0000
2012-11-20T19:59:39+00:00 app[web.1]: Processing by PagesController#home as HTML
2012-11-20T19:59:39+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-11-20T19:59:39+00:00 app[web.1]:     16: 
2012-11-20T19:59:39+00:00 app[web.1]:     20: 
2012-11-20T19:59:39+00:00 app[web.1]:     22:     <!-- Size should be 114 x 114 pixels -->
2012-11-20T19:59:39+00:00 app[web.1]:     21:     <!-- For iPhone with high-resolution Retina display: -->
2012-11-20T19:59:39+00:00 app[web.1]:     19:     <%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
2012-11-20T19:59:39+00:00 app[web.1]: ActionView::Template::Error (images/apple-touch-icon-144x144-precomposed.png isn't precompiled):
2012-11-20T19:59:39+00:00 app[web.1]:     18:     <!-- Size should be 144 x 144 pixels -->
2012-11-20T19:59:39+00:00 app[web.1]: 
2012-11-20T19:59:39+00:00 app[web.1]: 
2012-11-20T19:59:39+00:00 app[web.1]:   app/views/layouts/application.html.erb:19:in `_app_views_layouts_application_html_erb__4485189738011654672_31063660'

我正在使用 twitter_bootstrap。--- 初始修复后更新:

我让 heroku 开始运行,但是当我让 ti 显示数据库中的参数时它停止了。这一切都在本地工作。我找不到可能是什么问题。有人说重新启动heroku,我这样做了,但无济于事。

这是新的日志。

2012-11-20T21:39:39+00:00 heroku[web.1]: State changed from up to down
2012-11-20T21:39:39+00:00 heroku[web.1]: State changed from down to starting
2012-11-20T21:39:42+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-11-20T21:39:44+00:00 heroku[web.1]: Process exited with status 0
2012-11-20T21:39:53+00:00 heroku[web.1]: State changed from starting to up
2012-11-20T21:40:02+00:00 heroku[router]: at=info method=GET path=/ host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=4ms connect=21ms service=185ms status=304 bytes=0
2012-11-20T21:40:03+00:00 heroku[router]: at=info method=GET path=/assets/application-fbdaadfcf0bb7bb383cee6f4c1e1c57b.js host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=1ms connect=6ms service=3ms status=304 bytes=0
2012-11-20T21:40:03+00:00 heroku[router]: at=info method=GET path=/assets/application-9b102f3d65ffd824f6d66380b37af1d3.css host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=2ms service=4ms status=304 bytes=0
2012-11-20T21:40:05+00:00 heroku[router]: at=info method=GET path=/newstyle host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=2ms connect=14ms service=505ms status=304 bytes=0
2012-11-20T21:40:12+00:00 heroku[router]: at=info method=POST path=/styles host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=49ms status=302 bytes=106
2012-11-20T21:40:12+00:00 heroku[router]: at=info method=GET path=/styles/3 host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=3ms connect=18ms service=99ms status=500 bytes=643
2012-11-20T21:41:24+00:00 heroku[web.1]: State changed from up to down
2012-11-20T21:41:24+00:00 heroku[web.1]: State changed from down to starting
2012-11-20T21:41:26+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 29507`
2012-11-20T21:41:29+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-20T21:41:29+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-20T21:41:34+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2012-11-20T21:41:34+00:00 app[web.1]: >> Maximum connections set to 1024
2012-11-20T21:41:34+00:00 app[web.1]: >> Listening on 0.0.0.0:29507, CTRL+C to stop
2012-11-20T21:41:34+00:00 app[web.1]: >> Thin web server (v1.5.0 codename Knife)
2012-11-20T21:41:35+00:00 heroku[web.1]: State changed from starting to up
2012-11-20T21:41:36+00:00 app[web.1]: 
2012-11-20T21:41:36+00:00 app[web.1]: 
2012-11-20T21:41:36+00:00 app[web.1]: Started GET "/" for 66.25.149.26 at 2012-11-20 21:41:36 +0000
2012-11-20T21:41:37+00:00 app[web.1]: Processing by PagesController#home as HTML
2012-11-20T21:41:38+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (9.3ms)
2012-11-20T21:41:38+00:00 app[web.1]: Completed 200 OK in 231ms (Views: 230.4ms | ActiveRecord: 0.0ms)
2012-11-20T21:41:38+00:00 heroku[router]: at=info method=GET path=/assets/application-9b102f3d65ffd824f6d66380b37af1d3.css host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=41ms status=304 bytes=0
2012-11-20T21:41:38+00:00 heroku[router]: at=info method=GET path=/assets/application-fbdaadfcf0bb7bb383cee6f4c1e1c57b.js host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=106ms status=304 bytes=0
2012-11-20T21:41:40+00:00 app[web.1]: Processing by StylesController#new as HTML
2012-11-20T21:41:40+00:00 app[web.1]: Started GET "/newstyle" for 66.25.149.26 at 2012-11-20 21:41:40 +0000
2012-11-20T21:41:40+00:00 app[web.1]: 
2012-11-20T21:41:40+00:00 app[web.1]: 
2012-11-20T21:41:41+00:00 app[web.1]:   Rendered styles/new.html.erb within layouts/application (696.9ms)
2012-11-20T21:41:41+00:00 app[web.1]: Completed 200 OK in 1030ms (Views: 711.3ms | ActiveRecord: 29.8ms)
2012-11-20T21:41:41+00:00 app[web.1]:   Rendered styles/_form.html.erb (678.3ms)
2012-11-20T21:41:48+00:00 app[web.1]: Started POST "/styles" for 66.25.149.26 at 2012-11-20 21:41:48 +0000
2012-11-20T21:41:48+00:00 app[web.1]: 
2012-11-20T21:41:48+00:00 app[web.1]: Processing by StylesController#create as HTML
2012-11-20T21:41:48+00:00 app[web.1]: 
2012-11-20T21:41:48+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"WEpGdTD2B9P9pJOelseHsxDwVxU3ph3sbDeZPWPNXHc=", "style"=>{"bodytype"=>"Hourglass", "need"=>"Office", "texture"=>"Rich", "color"=>"Bright", "statement"=>"Shoe"}, "commit"=>"Create Recommendation"}
2012-11-20T21:41:48+00:00 app[web.1]: Redirected to http://mapmystyle.herokuapp.com/styles/4
2012-11-20T21:41:48+00:00 app[web.1]: Completed 302 Found in 65ms (ActiveRecord: 35.7ms)
2012-11-20T21:41:48+00:00 app[web.1]: 
2012-11-20T21:41:48+00:00 app[web.1]: Started GET "/styles/4" for 66.25.149.26 at 2012-11-20 21:41:48 +0000
2012-11-20T21:41:48+00:00 app[web.1]: 
2012-11-20T21:41:49+00:00 app[web.1]: Processing by StylesController#show as HTML
2012-11-20T21:41:49+00:00 app[web.1]:   Parameters: {"id"=>"4"}
2012-11-20T21:41:49+00:00 app[web.1]: Completed 500 Internal Server Error in 509ms
2012-11-20T21:41:49+00:00 app[web.1]:   app/controllers/styles_controller.rb:28:in `show'
2012-11-20T21:41:49+00:00 app[web.1]: 
2012-11-20T21:41:49+00:00 app[web.1]: 
2012-11-20T21:41:49+00:00 app[web.1]: NoMethodError (undefined method `link' for nil:NilClass):
2012-11-20T21:41:49+00:00 app[web.1]: 
2012-11-20T21:41:49+00:00 heroku[router]: at=info method=GET path=/styles/4 host=mapmystyle.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=641ms status=500 bytes=643

请帮忙!

4

1 回答 1

4

它说

images/apple-touch-icon-144x144-precomposed.png isn't precompiled

这就是错误。

将此行放入 config/application.rb 文件中

config.assets.initialize_on_precompile = false

如果您有 application.js 和 application.css 中不需要的其他 .js 或 .css 文件

例如 public.js 和 public.css

将此行添加到 production.rb 文件中(也添加了注释。)

# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
config.assets.precompile += %w( public.js public.css  )

bundle exec rake assets:precompile在本地代码上运行

你有任何错误吗?

如果不。

提交更改并部署到 heroku

于 2012-11-20T20:34:16.290 回答