title: Upgrading to Ruby on Rails 3.1: How to solve image loading issues in CSS files?
body: <p>I am using Ruby on Rails 3.0.10 and I am upgrading my RoR to the version 3.1.0. I am following the <a href="http://railscasts.com/episodes/282-upgrading-to-rails-3-1" rel="nofollow">Upgrading to Rails 3.1</a> railscast and on the time <em>07:04</em> he starts to talk about problems on loading image files...</p>
  
  <p>In few words:</p>
  
  <blockquote>
    <p>[...] This (that is, image loading - more information <a href="http://asciicasts.com/episodes/282-upgrading-to-rails-3-1" rel="nofollow">here</a>) won’t work as our application’s images are no longer in the /public/images directory. The simplest solution might appear to be to change the image’s URL from /images/railscasts_logo.png to /assets/railscasts_logo.png and while this will appear to work in development mode we’ll run into issues in production. [...] We should instead always use the helper methods. This will link the image correctly in both development and production mode. [...]</p>
  </blockquote>
  
  <p><em>My problem is in my CSS files</em> where I have statements like the following</p>
  
  <pre><code>.a_class {
      ...
      background-image: url("/images/avatar.png");
      ...
  }
  </code></pre>
  
  <p>that, as well as it should be, do not load correctly image files.</p>
  
  <p><strong>How can I solve that problem in Rails 3.1?</strong></p>