These days there are plenty of acceptable favicon formats.
You are no longer restricted to 16x16 image/x-icon file, as
long as support of IE < 11 is optional. Variety of mobile devices support
other types of icons, that are used instead or with favicons, namely
Range of sizes varies from 16x16 to 192x192 pixels.
Manual scaling for dozen of different sizes is strait violation of DRY principle, so here comes a possible solution for Rails application.