You can put all your images inside public/images, which is created by
the rails command, so it alread exists. If you do that, you can use the
helper image_tag to have Rails automatically generate the correct tag.
For example, to display your details.gif, you can do the following :
<%= image_tag "details.gif" %>
And Rails will generate the correct img tag (including when the root of
your Rails application is not the root of your web server), something
like:
<img src="/approot/images/details.gif" alt="DETAILS" />

See
http://api.rubyonrails.com/classes/ActionView/Helpers/AssetTagHelper.html#M000365
for more details.