Be careful here.  Expanding "~" depends on who is running the Rails
code and in production it often is either the user that runs the web
server or another "not real" user.  (A good thing for security)  So
you want to either put an absolute path OR put a path relative to
RAILS_ROOT if you can ensure that permissions will be OK.

Just remember that this may not work in Production.

Brendon.

On Apr 17, 7:17 am, Sergio Ruiz <[email protected]>
wrote:
> > Did you try expanding the path?
> > File.expand_path("~/public_html/upload")
>
> perfect! this works great..
>
> thanks!
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to