Hi all, my application has some very large file uploads, up to around 200MB. This eats up all my /tmp space (1 Gig) and so the upload fails. I get this message: No space left on device - /tmp/CGI16004-2 Is there a way to configure rails (or cgi.rb, as the case may be) to use a different tmp directory for file uploads? Thanks, Sean --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am using act_as_attachment in Model I have this : has_attachment :storage => :file_system, :resize_to => [300,185], :thumbnails => { :thumb => [84,60]}, :size => 0.megabyte..300.megabytes, :content_type => :image, :path_prefix => ''public/images/package'', :processor => ''Rmagick'' validates_as_attachment reinhart http://teapoci.blogspot.com -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Apr 30, 6:59 am, "Sean O''Hara" <sean.ali...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > my application has some very large file uploads, up to around 200MB. This > eats up all my /tmp space (1 Gig) and so the upload fails. I get this > message: No space left on device - /tmp/CGI16004-2 > > Is there a way to configure rails (or cgi.rb, as the case may be) to use a > different tmp directory for file uploads? >I think I am correct in saying that it all funnels through http://www.ruby-doc.org/core/classes/Dir.src/M002349.html which suggests that setting one of those environment variables will do the trick. Fred --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the suggestion. How would I set the environment variables for rails, or mongrel? Sean On Wed, Apr 30, 2008 at 4:12 AM, Frederick Cheung < frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > On Apr 30, 6:59 am, "Sean O''Hara" <sean.ali...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi all, > > my application has some very large file uploads, up to around 200MB. > This > > eats up all my /tmp space (1 Gig) and so the upload fails. I get this > > message: No space left on device - /tmp/CGI16004-2 > > > > Is there a way to configure rails (or cgi.rb, as the case may be) to use > a > > different tmp directory for file uploads? > > > > I think I am correct in saying that it all funnels through > http://www.ruby-doc.org/core/classes/Dir.src/M002349.html which > suggests that setting one of those environment variables will do the > trick. > > Fred > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 30 Apr 2008, at 14:02, Sean O''Hara wrote:> Thanks for the suggestion. How would I set the environment variables > for rails, or mongrel? >You could just set ENV[''Foo'']=''bar'' in your environment.rb file. Fred> Sean > > > On Wed, Apr 30, 2008 at 4:12 AM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > wrote: > > > > On Apr 30, 6:59 am, "Sean O''Hara" <sean.ali...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi all, > > my application has some very large file uploads, up to around > 200MB. This > > eats up all my /tmp space (1 Gig) and so the upload fails. I get > this > > message: No space left on device - /tmp/CGI16004-2 > > > > Is there a way to configure rails (or cgi.rb, as the case may be) > to use a > > different tmp directory for file uploads? > > > > I think I am correct in saying that it all funnels through > http://www.ruby-doc.org/core/classes/Dir.src/M002349.html which > suggests that setting one of those environment variables will do the > trick. > > Fred > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks! That seemed to work (console now says /var/tmp for Dir::tmpdir). Just have to wait for the long upload to complete to see how it is handled. take care, sean On Wed, Apr 30, 2008 at 9:41 AM, Frederick Cheung < frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 30 Apr 2008, at 14:02, Sean O''Hara wrote: > > > Thanks for the suggestion. How would I set the environment variables > > for rails, or mongrel? > > > > You could just set ENV[''Foo'']=''bar'' in your environment.rb file. > > Fred > > > Sean > > > > > > On Wed, Apr 30, 2008 at 4:12 AM, Frederick Cheung < > frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > wrote: > > > > > > > > On Apr 30, 6:59 am, "Sean O''Hara" <sean.ali...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi all, > > > my application has some very large file uploads, up to around > > 200MB. This > > > eats up all my /tmp space (1 Gig) and so the upload fails. I get > > this > > > message: No space left on device - /tmp/CGI16004-2 > > > > > > Is there a way to configure rails (or cgi.rb, as the case may be) > > to use a > > > different tmp directory for file uploads? > > > > > > > I think I am correct in saying that it all funnels through > > http://www.ruby-doc.org/core/classes/Dir.src/M002349.html which > > suggests that setting one of those environment variables will do the > > trick. > > > > Fred > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---