Displaying a list of files in the Rails 'public' folder

I am trying to sync certain subfolders in the ‘public’ folder of my
rails app to a folder on a different server, which does not have the
rails environment. So for example, I am trying to sync the ‘RAILS_ROOT/
public/stylesheets’ folder on server A with a folder called
‘stylesheets’ on server B.

I tried to use PHP on server B to copy all files from “http://
www.example.com/stylesheets/”, but I got a “routing error”, because
rails tries to match ‘stylesheets’ with an existing controller.

Is there a way to force rails to display a list of files in a
subfolder of the ‘public’ folder? So a URL to:
http://www.example.com/stylesheets/
will actually lead to a list of files in that folder…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs