2013年5月4日土曜日

atnd noticeのアイコンがない事でエラーログがめんどい

railsでtwitterbootstrapつかってるんだけど(そのせいかどうかはわからないが)

mobileでサイトをみるとログに iconないよ! ってログがたびたびでてきてる
放置してもいいんだけどログが大きくなりそうなので対処した

こんな感じのログ
-------------

Started GET "/assets/images/apple-touch-icon-precomposed.png" for 199.299.399.499 at 2013-05-04 11:48:41 +0900
Served asset /images/apple-touch-icon-precomposed.png - 404 Not Found (2ms)

ActionController::RoutingError (No route matches [GET] "/assets/images/apple-touch-icon-precomposed.png"):
  actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
  rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
  rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.13) lib/rails/engine.rb:479:in `call'
  railties (3.2.13) lib/rails/application.rb:223:in `call'
  railties (3.2.13) lib/rails/railtie/configurable.rb:30:in `method_missing'
  passenger (3.0.19) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.19) lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
  passenger (3.0.19) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
  passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application'
  passenger (3.0.19) lib/phusion_passenger/utils.rb:470:in `safe_fork'
  passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
  passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'

  passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
  passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
  passenger (3.0.19) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
  passenger (3.0.19) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
  <internal:prelude>:10:in `synchronize'
  passenger (3.0.19) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
  passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
  passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.19) helper-scripts/passenger-spawn-server:99:in `<main>'
-------------------

なのでiconつくった

このサイトがすげー助かった

http://www.gieson.com/Library/projects/utilities/icon_slayer/#.UYR5WyvOQtd

画像自体はてきとーにスクリーンショットでいいので画面をキャプチャ
http://hamachan.info/mac/kihon/screen.html

そんでさっきのサイトにuploadすればできあがり

http://www.gieson.com/Library/projects/utilities/icon_slayer/#.UYR5WyvOQtd
このサイトは本とありがたい事にandroid用もできるし、いろんなサイズもできてる
すごい便利だ



そこで どこに置くか?
おそらく
/app/assets/images  におけばいいんだろと思ってたけどうまくいかない

試しに
public/assets/images/ においてみたらうまくいった

どっちがただしいんだろ。。。。

public/images/apple-touch...... が正しいみたい。。。

ここも参考になる
http://fukuyama.co/apple-touch-icon

0 件のコメント:

コメントを投稿