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

**URL:** <https://www.ruby-forum.com/t/displaying-a-list-of-files-in-the-rails-public-folder/113407>\
**Category:** Rails\
**Created:** [August 30, 2007, 8:24pm UTC](https://www.ruby-forum.com/t/displaying-a-list-of-files-in-the-rails-public-folder/113407 "2007-08-30T20:24:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7feea3/32.png) [@Lei](https://www.ruby-forum.com/u/Lei)\
**Post date:** [August 30, 2007, 8:24pm UTC](https://www.ruby-forum.com/t/displaying-a-list-of-files-in-the-rails-public-folder/113407/1 "2007-08-30T20:24:40Z")

</div>

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/](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/](http://www.example.com/stylesheets/)  
will actually lead to a list of files in that folder…
