How do I use a favicon in rails 6 ?

232 views
Skip to first unread message

fugee ohu

unread,
Dec 9, 2019, 4:51:19 PM12/9/19
to Ruby on Rails: Talk
I tried creating a favicons folder under app/javascripts/images/favicons and a favicons.js file in app/javascripts/packs and an import statement in app/javascripts/packs/application.js to load the favicons.js file but I just got an error from webpacker that there was no entry in manifest.json for favicon.ico I had tried to follow the tutorial here https://medium.com/tech-angels-publications/bundle-your-favicons-with-webpack-b69d834b2f53

Ariel Juodziukynas

unread,
Dec 9, 2019, 4:58:45 PM12/9/19
to rubyonra...@googlegroups.com
Why don't you just put the favicon.ico file on your /public folder? do you have something special to use javascript for this?

El lun., 9 dic. 2019 a las 18:51, fugee ohu (<fuge...@gmail.com>) escribió:
I tried creating a favicons folder under app/javascripts/images/favicons and a favicons.js file in app/javascripts/packs and an import statement in app/javascripts/packs/application.js to load the favicons.js file but I just got an error from webpacker that there was no entry in manifest.json for favicon.ico I had tried to follow the tutorial here https://medium.com/tech-angels-publications/bundle-your-favicons-with-webpack-b69d834b2f53

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/dbfe8f63-8cc6-41b2-93a6-85a0f3e2a2f4%40googlegroups.com.

fugee ohu

unread,
Dec 10, 2019, 7:53:03 AM12/10/19
to Ruby on Rails: Talk


On Monday, December 9, 2019 at 4:58:45 PM UTC-5, Ariel Juodziukynas wrote:
Why don't you just put the favicon.ico file on your /public folder? do you have something special to use javascript for this?

El lun., 9 dic. 2019 a las 18:51, fugee ohu (<fuge...@gmail.com>) escribió:
I tried creating a favicons folder under app/javascripts/images/favicons and a favicons.js file in app/javascripts/packs and an import statement in app/javascripts/packs/application.js to load the favicons.js file but I just got an error from webpacker that there was no entry in manifest.json for favicon.ico I had tried to follow the tutorial here https://medium.com/tech-angels-publications/bundle-your-favicons-with-webpack-b69d834b2f53

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.

I don't know Can you look at the page and tell me if it works for you

Ariel Juodziukynas

unread,
Dec 10, 2019, 8:20:09 AM12/10/19
to rubyonra...@googlegroups.com
What I mean is that you don't really need webpacker for the favicon, you can just put the favicon.ico file inside app/public and it should work

To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bf34e030-ddfa-420c-b0f2-79105547c9ba%40googlegroups.com.

fugee ohu

unread,
Dec 10, 2019, 11:13:11 AM12/10/19
to Ruby on Rails: Talk


On Tuesday, December 10, 2019 at 8:20:09 AM UTC-5, Ariel Juodziukynas wrote:
What I mean is that you don't really need webpacker for the favicon, you can just put the favicon.ico file inside app/public and it should work

El mar., 10 dic. 2019 09:53, fugee ohu <fuge...@gmail.com> escribió:


On Monday, December 9, 2019 at 4:58:45 PM UTC-5, Ariel Juodziukynas wrote:
Why don't you just put the favicon.ico file on your /public folder? do you have something special to use javascript for this?

El lun., 9 dic. 2019 a las 18:51, fugee ohu (<fuge...@gmail.com>) escribió:
I tried creating a favicons folder under app/javascripts/images/favicons and a favicons.js file in app/javascripts/packs and an import statement in app/javascripts/packs/application.js to load the favicons.js file but I just got an error from webpacker that there was no entry in manifest.json for favicon.ico I had tried to follow the tutorial here https://medium.com/tech-angels-publications/bundle-your-favicons-with-webpack-b69d834b2f53

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/dbfe8f63-8cc6-41b2-93a6-85a0f3e2a2f4%40googlegroups.com.

I don't know Can you look at the page and tell me if it works for you

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.

Why is rails complaining that it's not in manifest.json am I missing entries in package.json?
Reply all
Reply to author
Forward
0 new messages