views:

328

answers:

1

I have a rails application with static content in the public directory (e.g. public/index.html) and additional static content in nested subdirectories (e.g. public/one/two/index.html).

All the static content is served correctly if I run it locally via script/server but when I upload it to Heroku the top-level page loads correctly but the nested content returns a 404.

I've found a number of resources (for example this question) which discuss static content in rails but they all seem to assume a fairly simple structure with a single directory containing all the files.

Is there any way I can fix this?

+1  A: 

If you have a very simple web application (with mostly static content, say) then using Sinatra on Heroku is much simpler to set up and prevents this type of problem.

Matthew Murdoch