Moving public directory outside of rails structure

Hi,

I deployed my Rails app to Media Temple where they have a 64mb limit on
everything inside the RoR application container. This means that with my
file uploading going to my public directory, that 64mb limit will be hit
very quickly.

I need to move my public directory “higher” up on the server to a new
path so that its outside my application directory.

What are the steps I need to take to do this?

On Nov 14, 8:43 pm, Eric G. [email protected]
wrote:

What are the steps I need to take to do this?
Use symbolic links pointing to a directory outside the application
tree? This is of course assuming that Media Temple uses *NIX servers.
Currently that’s how I manage certain subdirectories in my public
directory, albeit for a different reason.

Could you give me an example of how I could use these symbolic links.

Do you have any code you can show me? Where do i put these links?
Sorry, Im kind of a newb at this stuff.

Eric

Phil wrote:

On Nov 14, 8:43 pm, Eric G. [email protected]
wrote:

What are the steps I need to take to do this?
Use symbolic links pointing to a directory outside the application
tree? This is of course assuming that Media Temple uses *NIX servers.
Currently that’s how I manage certain subdirectories in my public
directory, albeit for a different reason.

On Nov 14, 9:55 pm, Eric G. [email protected]
wrote:

Could you give me an example of how I could use these symbolic links.

Do you have any code you can show me? Where do i put these links?
Sorry, Im kind of a newb at this stuff.

Eric

Symbolic links are a feature in *NIX filesystems. A way you could use
it for the problem you have is to create a directory, say “uploads”,
somewhere above the Rails directory. Let’s say the full path to this
directory is /home/username/uploads, and your Rails application lives
at /home/username/railsapp.

In the /home/username/railsapp/public directory, you would then create
a link called uploads, pointing to /home/username/uploads. This means
that when you access /home/username/railsapp/public/uploads, it
actually maps to /home/username/uploads. Follow me?

That way, you have a directory higher up in the filesystem hierarchy
that is still accessible by the webserver.

If you have SSH access, the *NIX command to create a symlink is “ln -s
/the/path/to/link/to [name]”. If you omit the name parameter, it
defaults to the last component of the path argument (in this contrived
example, that would be “to”). If you don’t have shell access, you’d
have to find out how to create a symlink via a web interface or
something similar. I don’ t know if it’s possible to create them via
FTP.

I hope I’ve made myself clear enough. If not, just yell at me.

~P