First, Apple touch icons must be in PNG format, not JPEG. They should also be called "apple-touch-icon".
Regarding the problem, the first, but not ideal solution is to place the icon of your apple in your public directory and hard-code the link.
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
Alternatively, in the same note, you can add it / public / images so that the generated link is correct.
I suspect, however, that a plugin, such as bootstrap, adds the link as it sees fit. In case of using bootstrap or something similar, I would look for HAML for "apple-touch-icon" and see what you can find. Most likely something like:
%link{:href => "images/apple-touch-icon.png", :rel => "apple-touch-icon"}
If you find it, delete it.
This is to the side of its potential rails that are too smart and understand that the file name / file type is incorrect and adding links.
Allan w smith
source share