# Can I show the data stored in public directory?

**URL:** <https://www.ruby-forum.com/t/can-i-show-the-data-stored-in-public-directory/204590>\
**Category:** Rails\
**Created:** [March 16, 2011, 1:59pm UTC](https://www.ruby-forum.com/t/can-i-show-the-data-stored-in-public-directory/204590 "2011-03-16T13:59:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 16, 2011, 1:59pm UTC](https://www.ruby-forum.com/t/can-i-show-the-data-stored-in-public-directory/204590/1 "2011-03-16T13:59:49Z")

</div>

Hello there,  
I would like to ask you if is possible to show data, which I’ve to  
saved in /public/my\_dir\_for\_data.

If I try to display an image from this directory, I get “Routing error”.  
Probably when I would to saved the data to root of my application, e.g.  
/my\_data, everything will be ok… but I like this structure of RoR  
application and I will be glad, if I could to use the directory in in  
/public…

Exist any way, how to do? (and simultaneously security?)

---

<div class="post-metadata">

**Author:** ![manny7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecc23a/32.png) [@manny7](https://www.ruby-forum.com/u/manny7)\
**Post date:** [March 16, 2011, 2:54pm UTC](https://www.ruby-forum.com/t/can-i-show-the-data-stored-in-public-directory/204590/2 "2011-03-16T14:54:06Z")

</div>

On Mar 16, 12:59pm, Manny 777 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello there,  
> I would like to ask you if is possible to show data, which I’ve to  
> saved in /public/my\_dir\_for\_data.
> 
> If I try to display an image from this directory, I get “Routing error”.  
> Probably when I would to saved the data to root of my application, e.g.  
> /my\_data, everything will be ok… but I like this structure of RoR  
> application and I will be glad, if I could to use the directory in in  
> /public…

How are you trying to access stuff?

if you’ve got /public/my\_dir/foo.png then that should be available at

> **[应用宝官网-全网最新最热手机应用游戏下载](https://sj.qq.com)**
>
> 应用宝是腾讯旗下官方手机app应用商店，致力于为您提供海量、优质、安全、最新的安卓应用游戏下载！

Fred
