cw36ca
Last Updated: February 25, 2016
·
727
· accessd

Gem to display the rails environment on the favicon

Made changes in the code to debug and do not understand what's wrong. Hell, I'm on the debug production! This happened to you? To me several times. Library offers one of the ways to solve this problem.

Most everyone will understand from one picture:

Picture

This means that on the first tab we have development environment, on second stage, and third it's production(we don't need change this favicon).

It uses Tinycon - A small library for manipulating the favicon.

And one more option:

Picture

Icon will be gray on non production environment.

Link to the gem: https://github.com/accessd/rails-env-favicon

7 Responses
Add your response

15367

Nice gem, however it wil be better if it was a middleware instead of js file

over 1 year ago ·
15368

@seuros possible, but there are several moments:

  1. How to prevent caching favicon by browser?
  2. Suppose we will use rmagick, then in all environments will need to install imagemagick

And yes, I tried to do it, you can look at branch rmagick

over 1 year ago ·
15369
  • by adding expire header when we send the file
  • I would prefer minimagick for performance. I could put the rails-env-favicon in all groups execpt production for example. The option of js will still be available, but the person has to remove it just before deploying to production.
over 1 year ago ·
15370

@seuros

by adding expire header when we send the file

not getting it done, help is welcome:)

over 1 year ago ·
15371

Will do!

over 1 year ago ·
15945

Now you may use version with middleware! https://github.com/accessd/rails-env-favicon/tree/rmagick

over 1 year ago ·
21134

good

over 1 year ago ·