2012-11-20 18 views
1

我的應用在本地工作正常,甚至今天早上早些時候,我能夠讓它在Heroku中顯示。但是,現在已經完成了很多工作,我收到了這個討厭的消息!Heroku - apple-touch-icon-144x144-precomposed.png沒有預編譯

這裏是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開始運行,但是當我從數據庫顯示參數時它停止。這都在本地工作。我無法找到可能是什麼問題。有人說我重新啓動了Herku,但沒有成功。

這是新的日誌。

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 

請幫幫忙!

+0

看起來它正在尋找apple-touch-icon,但它不在那裏。你確定你把它放在資產文件夾中嗎? – Magicmarkker

+0

您是否在預編譯資源中指定了apple-touch-icon? *您是否預編譯資產? –

+1

看來您的資產沒有預先編譯。當您將應用推送到heroku時,您是否看到與「資產」或「預編譯」相關的任何錯誤?如果是這樣,請檢查你的'config/application.rb'並確保你有'config.assets.initialize_on_precompile = false'。 – cdesrosiers

回答

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

+0

謝謝,這工作,有點。但是,我也必須處理蘋果的圖像,正如上面的評論中所建議的那樣。 :-(現在我得到了一種不同的錯誤,我沒有得到本地:已完成500內部服務器錯誤 –

+0

首先谷歌你顯示錯誤的行如果你沒有找到答案,更新你的問題與新的錯誤日誌有時Heroku的部署可能會很困難如果我們經歷了錯誤,我們可能會幫助其他人 –

+0

剛剛對問題進行了更新,我檢查了heroku控制檯,看起來Heroku甚至不認識推薦模式 –