skip to Main Content

When I using image_path ("something"), response doesn’t have fingerprint. (expected something-1y7asdft786f78as.png)
But when I using javascript_include_tag, it is shown with fingerprint.

I googled and figure out config.assets.digest = true or config.assets.compile = true. First don’t work. Seconds is worked with very slow speed.

Who know what’s wrong?

# Be sure to restart your server when you modify this file.
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.1'

# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
Rails.application.config.assets.precompile += %w( twitter/bootstrap/* ZeroClipboard.swf )

  # Do not fallback to assets pipeline if a precompiled asset is missed.
  config.assets.compile = false

  # Debug mode disables concatenation and preprocessing of assets.
  # This option may cause significant delays in view rendering with a large
  # number of complex assets.
config.assets.debug = true

  # Asset digests allow you to set far-future HTTP expiration dates on all assets,
  # yet still be able to expire them through the digest params.
  config.assets.digest = true



  1. Chosen as BEST ANSWER

    I forgot I had added assets/zeroclipboard.min.js file. So zeroclipboard-rails gem had conflicted.

    Simply, I removed zeroclipboard.min.js file from assets/zeroclipboard.min.js. And the problem was solved.

  2. i had a similar problem, try:

    background-image: asset-data-url('something.png');
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top