Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7549927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:04:53+00:00 2026-05-30T10:04:53+00:00

After deploy on heroku cedar, images desapear. I’ve a CSS like : :css /*

  • 0

After deploy on heroku cedar, images desapear.

I’ve a CSS like :

:css
  /* */
  table.table thead .sorting { background: url('assets/datatables/sort_both.png') no-repeat center right; }
  table.table thead .sorting_asc { background: url('assets/datatables/sort_asc.png') no-repeat center right; }
  table.table thead .sorting_desc { background: url('assets/datatables/sort_desc.png') no-repeat center right; }
  /* */
  table.table thead .sorting_asc_disabled { background: url('assets/datatables/sort_asc_disabled.png') no-repeat center right; }
  table.table thead .sorting_desc_disabled { background: url('assets/datatables/sort_desc_disabled.png') no-repeat center right; }

and relative png into app/assets/images/datatables/Locally works, but not on Heroku.

I could also use = asset_tag('datatables/icon.png') …, but how to do it inside CSS ?

I’ve also tried config.action_dispatch.x_sendfile_header = nil in config/environments/production.rb without success.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:04:54+00:00Added an answer on May 30, 2026 at 10:04 am

    In the production environment the assets will have an MD5 thumbprint appended to their URL. It is important that you use the asset path helpers so that the right filename is used.

    It appears that you are using Haml, based on the :css filter.

    In Haml you can interpolate Ruby into the doucment with #{ ruby }

    :css
      table.table thead .sorting { background-image: url(#{ asset_path('datatables/sort_both.png')}) }
      ... and so on.
    

    If you are using Sass/SCSS, you can use the built in asset helpers.

    table.table thead .sorting { 
      background-image: asset-url('datatables/sort_both.png');
    }
    

    Its a little more complicated if you are using plain CSS. You’ll need to append .erb to the css file. (‘assets/stylesheets/file.css.erb’)

    table.table thead .sorting {
      background-image: url(<%= asset_path('datatables/sort_both.png') %>);
    } 
    

    You should use Sass or SCSS. Its the cleanest and leanest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After I deploy an app to Heroku, I run migration scripts and get this
I'm trying to deploy an application to Heroku after upgrading to Rails 3.1 with
I made a solution to deploy a custom master page (a WSP file). After
I am having a problem with Vlad on windows. After calling rake vlad:deploy I
I'm trying to deploy my Grails-app (1.3.7) on Heroku. I downloaded the Heroku-plugin, added
I have an asp.net3.5 website.want to deploy this site on iis.After deploy my default
I am constantly writing custom WebParts but after I deploy them, they always get
After my first question , id like to have a confirmation about the best
I have the following in my deploy.rb : after deploy:update_code, sphinx:stop after deploy:migrate, sphinx:start
I'm currently working on a multi-stage recipe for Capistrano that would, ideally, after deploy,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.