title: How to use image_url in rails to show images in production?
body: <p>I have this code</p>
  
  <pre><code>&lt;div class="w-col w-col-7 w-col-stack w-hidden-small w-hidden-tiny col-spc"&gt;
       &lt;div class="nivo-slice" style="left: 0px; width: 900px; height: 100%; opacity: 1;"&gt;
            &lt;img src="/assets/home/toppho08.jpg" alt="toppho08.jpg"&gt;
       &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>and it work well in development but when i tried to run it in production, images won't be displayed. So, I was told to use image_url but it html seems to not accept the code. I have this instead and it went okay.</p>
  
  <pre><code>&lt;img src="http://sitename.com/assets/home/toppho08.jpg" alt="toppho08.jpg"&gt;
  </code></pre>
  
  <p>But I want to use the image_url.
  How do I apply <code>image_url</code> in html? </p>
  
  <p>These links do not answer my question
  <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetUrlHelper.html" rel="nofollow noreferrer">http://api.rubyonrails.org/classes/ActionView/Helpers/AssetUrlHelper.html</a>
  <a href="http://awardwinningfjords.com/2009/05/11/simplify-image-paths-with-image_url.html" rel="nofollow noreferrer">http://awardwinningfjords.com/2009/05/11/simplify-image-paths-with-image_url.html</a>
  <a href="https://ellislab.com/forums/viewthread/54731/#268424" rel="nofollow noreferrer">https://ellislab.com/forums/viewthread/54731/#268424</a>
  <a href="https://stackoverflow.com/questions/27630074/rails-4-not-right-path-for-image-url">Rails 4 not right path for image_url</a></p>