Search code examples
ruby-on-railsruby-on-rails-3ruby-on-rails-3.1

Rails 3.1, get No route matches [GET] "/" when trying to link_to XLS document in public directory


I use link_to helper with a XLS document in PUBLIC directory.

I have migrated recently my rails APP from version 3.0.10 to version 3.1.8

since migration, I live problem when I refer my XLS document with the link_to helper.

I get the following error: Started GET "/public/IMCClients.xls" for 127.0.0.1 at 2012-10-19 13:11:35 -0400 ActionController::RoutingError (No route matches [GET] "/public/IMCClients.xls"):

How can I resolve my problem?


Solution

  • see if this works <% link_to "Link Name", root_path+"/IMCClients.xls" %>