Hi, I have the follwoing code running locally in development mode and it works perfectly <% for document in @documents %> <%if File.exist?(RAILS_ROOT+"/public/Documents/document/document/"+document.id.to_s+"/"+document.name) %> <%= image_tag( document.extension+".gif", { :alt => document.extension+" file logo", :class=> "document"} ) %> <a href="/Documents/document/document/<%= document.id %>/<%= document.name %>"> <%= document.title %></a> <br/> <% end %> <% end %> the above code basically shows the document type image and a link to the document. Ive moved this code to a test server and tried it and i keep getting an error message object doesnt exist so ive also used the below code and it doesnt work either, i know the file exists because the if statement checks to see if this file exists and if it does it shows a link to it: <a href="<%= RAILS_ROOT %>/Documents/document/document/<%= document.id %>/<%= document.name %>"> Whats the bestt way to provide a link to a document as i dont want it to get mixed up in the routing. JB -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---