2015-02-08 37 views
1
Started GET "/apple-touch-icon.png" for ::1 at 2015-02-08 16:46:28 -0600 

ActionController::RoutingError (No route matches [GET] "/apple-touch-icon.png"): 
    web-console (2.0.0) lib/action_dispatch/debug_exceptions.rb:22:in `middleware_call' 
    web-console (2.0.0) lib/action_dispatch/debug_exceptions.rb:13:in `call' 
    actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' 
    railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app' 
    railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call' 
    activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged' 
    activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged' 
    activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged' 
    railties (4.2.0) lib/rails/rack/logger.rb:20:in `call' 
    actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call' 
    rack (1.6.0) lib/rack/methodoverride.rb:22:in `call' 
    rack (1.6.0) lib/rack/runtime.rb:18:in `call' 
    activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' 
    rack (1.6.0) lib/rack/lock.rb:17:in `call' 
    actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call' 
    rack (1.6.0) lib/rack/sendfile.rb:113:in `call' 
    railties (4.2.0) lib/rails/engine.rb:518:in `call' 
    railties (4.2.0) lib/rails/application.rb:164:in `call' 
    rack (1.6.0) lib/rack/lock.rb:17:in `call' 
    rack (1.6.0) lib/rack/content_length.rb:15:in `call' 
    rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service' 
    /Users/Raphel/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' 
    /Users/Raphel/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' 
    /Users/Raphel/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' 


    Rendered /Users/Raphel/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0/lib/action_dispatch/templates/rescues/_trace.html.erb (1.5ms) 
    Rendered /Users/Raphel/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0/lib/action_dispatch/templates/routes/_route.html.erb (0.8ms) 
    Rendered /Users/Raphel/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0/lib/action_dispatch/templates/routes/_table.html.erb (1.9ms) 
    Rendered /Users/Raphel/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0/lib/action_dispatch/templates/rescues/_request_and_response.html.erb (1.1ms) 
    Rendered /Users/Raphel/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0/lib/action_dispatch/templates/rescues/_web_console.html.erb (1.2ms) 
    Rendered /Users/Raphel/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0/lib/action_dispatch/templates/rescues/routing_error.html.erb within rescues/layout (83.4ms) 
+0

您可以發佈用於在應用程序中包含圖標的代碼嗎? – 2015-02-08 23:49:56

+0

我以爲我只是把文件放在那個目錄下。對不起,這是我第一次使用Rails。我如何包含圖標? – 2015-02-09 00:00:10

回答

4

嘗試把圖像在app/assets/images目錄中並重新啓動服務器。

更新

這裏是你如何可以包括一個蘋果觸摸圖標...

應用/佈局/ application.html.erb

<head> 
    <%= favicon_link_tag "apple-touch-icon-100.png", 
         rel: "apple-touch-icon", 
         sizes: "100x100", 
         type: "image/png" %> 
</head> 

確保apple-touch-icon-100.png中存在app/assets/images目錄。

+0

我剛剛嘗試過,但沒有奏效。我正在使用2張100x100的圖像 – 2015-02-08 23:35:50

+0

您的app/assets/images'文件夾中是否有名爲'apple-touch-icon.png'的圖像? – 2015-02-08 23:39:37

+0

是的,我把它放在那裏,因爲你建議 – 2015-02-08 23:44:27

相關問題