ruby on rails - Image src doesn't look like it's going through asset pipeline -


i'm going through rails tutorial michael hartl. in 1 of chapters explaining asset pipeline, , if enter link_to helper code image_tag so:

<%= link_to image_tag("rails.png", alt: "rails logo"), 'http://rubyonrails.org/' %>  

it should see produce similar this:

<img alt="rails logo" src="/assets/rails-9308b8f92fea4c19a3a0d8385b494526.png" /> 

but in browser see actual image directory

<a href="http://rubyonrails.org/"><img alt="rails logo" src="/assets/rails.png" /></a> 

note page renders fine in browser, i'm wondering why code doesn't in book.

because you're viewing page in development environment. hashed version of image created when assets compiled. typically happens when deploy app production.


Comments