I am little bit confuse that I am showing images through css it’s working fine. But when I am showing images using views it’s not display. Following is simple code I am using. But I cannot find what’s wrong!
new.html.erb
<h1>Users#new</h1>
<p>Find me in app/views/users/new.html.erb</p>
<img src='close.png'>
I am getting this error in console:
ActionController::RoutingError (No route matches [GET] "/users/close.png"):
actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
This is the dir image of project:

It would be easier to use the
image_taghelper method – this will put in the right src path for you automatically, so long as you are storing your images where the asset pipeline expects them to be (you are). e.g.