# Local path to public directory

**URL:** <https://www.ruby-forum.com/t/local-path-to-public-directory/151099>\
**Category:** Rails\
**Created:** [October 16, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/local-path-to-public-directory/151099 "2008-10-16T19:48:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [October 16, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/local-path-to-public-directory/151099/1 "2008-10-16T19:48:32Z")

</div>

I was searching web for sometime but I couldn’t find the answer. Is  
there a  
way to get the local path for public folder of a rails application. Lets  
say  
my applications name is ‘depot’. I want the path to its public folder  
regardless of where I put the application in the harddisk. For example

‘C:\rails\depot\public’ or ‘D:\foo\doo\depot\public’

Is there a method/class for that?  
Thx alot

---

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [October 16, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/local-path-to-public-directory/151099/2 "2008-10-16T19:52:31Z")

</div>

Does:

RAILS\_ROOT+’/public’

solve your problem?

---

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [October 16, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/local-path-to-public-directory/151099/3 "2008-10-16T19:57:53Z")

</div>

yep great, How I could not find such a simple answer 🙂

Thx alot mate.

2008/10/16 Ar Chron [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
