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.
David Andrew T. (Guest)
on 2006-03-04 23: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 T.
http://dathompson.blogspot.com
Tom D. (Guest)
on 2006-03-04 23: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
David Andrew T. (Guest)
on 2006-03-04 23: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 D. <removed_email_address@domain.invalid> 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 T.
http://dathompson.blogspot.com
Craig W. (Guest)
on 2006-03-05 00:54
(Received via mailing list)
On Sat, 2006-03-04 at 13:21 -0800, David Andrew T. 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
Tom D. (Guest)
on 2006-03-05 18: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
Fernando P. (Guest)
on 2008-10-16 17: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.
Fernando P. (Guest)
on 2008-10-16 17:44
Fernando P. 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.