Forum: Ruby on Rails Favicon?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C4edcb52652d2b17fe2b38ef13bae729?d=identicon&s=25 David Andrew Thompson (Guest)
on 2006-03-04 22:23
(Received via mailing list)
I'm sure I'm missing something rudimentary here...

I seem to be having difficulty getting my favicon to appear. I have my
favicon.ico in the public folder. I've configured my route.rb to route
the intro page to my "home" controller. I'm using application.rb in my
views to template the headers and footers.

Here is the tag in my <head> in the application.rb:

	<link rel="shortcut icon" href="favicon.ico" />

Any ideas?

Dave

--
~~~~~~~~~~~~~~~~~~~
David Andrew Thompson
http://dathompson.blogspot.com
22580f640e491f0920a192610d1df393?d=identicon&s=25 Tom Davies (Guest)
on 2006-03-04 22:38
(Received via mailing list)
Most likely it is the missing / before the favicon.ico.

The rel="shortcut icon" is for when it is dragged to the desktop.  You
will also need a rel="icon".

Also, you should add a forward slash before the favicon.ico path to
make it an absolute path.

Try using these:

<link rel="icon" href="/favicon.ico" type="image/ico" />
<link rel="shortcut icon" href="/favicon.ico" type="image/ico" />

Tom
C4edcb52652d2b17fe2b38ef13bae729?d=identicon&s=25 David Andrew Thompson (Guest)
on 2006-03-04 22:44
(Received via mailing list)
Thanks...I changed the code to reflect the appropriate syntax, with my
favicon.ico file in {root}/public , but still nothing.

Then, I changed the target path to "images/favicon.ico" and stuck the
favicon.ico file in the images folder of public so:
<link rel="icon" href="images/favicon.ico" type="image/ico" />
{root}/public/images/favicon.ico

It's showing now.


On 3/4/06, Tom Davies <atomgiant@gmail.com> wrote:
> <link rel="icon" href="/favicon.ico" type="image/ico" />
> > views to template the headers and footers.
> > ~~~~~~~~~~~~~~~~~~~
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
~~~~~~~~~~~~~~~~~~~
David Andrew Thompson
http://dathompson.blogspot.com
C1e5a9e9344b6d31b9df7303e6dc378a?d=identicon&s=25 Craig White (Guest)
on 2006-03-04 23:54
(Received via mailing list)
On Sat, 2006-03-04 at 13:21 -0800, David Andrew Thompson wrote:
>
----
I didn't have to do anything like that but I did have to close all
copies of the web browser and restart the web server (or webrick as it
were) and then it started working and I felt foolish when I asked the
list and then later that day it started showing up.

Craig
22580f640e491f0920a192610d1df393?d=identicon&s=25 Tom Davies (Guest)
on 2006-03-05 17:33
(Received via mailing list)
Hi David,

I believe some versions of Internet Explorer expect the favicon.ico to
be in the root of the website (so in your public folder).  So, you may
want to keep another copy there... or just move it to the root of the
public folder.

Tom
059ed46172a087063ce26250e44c8627?d=identicon&s=25 Fernando Perez (fernando)
on 2008-10-16 15:11
2 and a half years later. Well I just had this issue, and
closing/reopening the browser made the favicon finally appear!

If this can cave someone a few moments of frustration.
059ed46172a087063ce26250e44c8627?d=identicon&s=25 Fernando Perez (fernando)
on 2008-10-16 15:44
Fernando Perez wrote:
> 2 and a half years later. Well I just had this issue, and
> closing/reopening the browser made the favicon finally appear!
>
> If this can cave someone a few moments of frustration.

Hmm, I tested on IE6, and the favicon won't appear. Anyway even
microsoft.com won't display any favicon, so I won't even bother.
This topic is locked and can not be replied to.