Mischa Berger
2006-Nov-25 19:55 UTC
Mongrel upload progress jumps from 0% to 100% (no progress)
Hi, I''ve been trying to implement monrel upload progress, but I cannot get it to work properly. I hope someone here can help me. I followed the instructions on this page: http://mongrel.rubyforge.org/docs/upload_progress.html Uploading files works fine, but unfortunately no progress is shown. When I start the upload the progress bar says 0%, when the upload is finished the progress bar jumps from 0% to 100% without showing progress in the mean time. I have no idea what I could be doing wrong. Has anyone here encountered the same problems? I''m running OSX 10.4.8. Could that be the problem? I tried it with just Mongrel and with Mongrel + Apache, both behave the same way. Any suggestions?? Thanks in advance. Mischa. -- 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 -~----------~----~----~----~------~----~------~--~---
Matt White
2006-Nov-26 03:13 UTC
Re: Mongrel upload progress jumps from 0% to 100% (no progress)
Mischa, This might be a REALLY stupid answer, but it''s the most obvious one... Are you testing locally only? If so, make sure that you throttle your bandwidth in some way (perhaps using ServiceMonitor) so that it simulates an upload with a bandwidth constraint. Otherwise the transfer will occur too fast for the upload_progress to actually do anything. I''m using mongrel_upload_progress without difficulty behind Pen + Apache, so Apache isn''t an issue. And it works fine in dev mode with Mongrel only. If this doesn''t help (and I''m pretty sure it won''t ;), post some code so we can be of more help... Matt On 11/26/06, Mischa Berger <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hi, > > I''ve been trying to implement monrel upload progress, but I cannot get > it to work properly. I hope someone here can help me. > > I followed the instructions on this page: > http://mongrel.rubyforge.org/docs/upload_progress.html > > Uploading files works fine, but unfortunately no progress is shown. When > I start the upload the progress bar says 0%, when the upload is finished > the progress bar jumps from 0% to 100% without showing progress in the > mean time. I have no idea what I could be doing wrong. Has anyone here > encountered the same problems? > > I''m running OSX 10.4.8. Could that be the problem? I tried it with just > Mongrel and with Mongrel + Apache, both behave the same way. > > Any suggestions?? Thanks in advance. > > Mischa. > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Matt White ----------------------- Thermal Creative http://blog.thermalcreative.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 -~----------~----~----~----~------~----~------~--~---
Matt White
2006-Nov-26 03:17 UTC
Re: Mongrel upload progress jumps from 0% to 100% (no progress)
Whoops, my bad... ServiceCapture: http://kevinlangdon.com/serviceCapture/ Matt On 11/26/06, Matt White <stockliasteroid-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Mischa, > > This might be a REALLY stupid answer, but it''s the most obvious one... Are > you testing locally only? If so, make sure that you throttle your bandwidth > in some way (perhaps using ServiceMonitor) so that it simulates an upload > with a bandwidth constraint. Otherwise the transfer will occur too fast for > the upload_progress to actually do anything. > > I''m using mongrel_upload_progress without difficulty behind Pen + Apache, > so Apache isn''t an issue. And it works fine in dev mode with Mongrel only. > > If this doesn''t help (and I''m pretty sure it won''t ;), post some code so > we can be of more help... > > Matt > > On 11/26/06, Mischa Berger <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > > > Hi, > > > > I''ve been trying to implement monrel upload progress, but I cannot get > > it to work properly. I hope someone here can help me. > > > > I followed the instructions on this page: > > http://mongrel.rubyforge.org/docs/upload_progress.html > > > > Uploading files works fine, but unfortunately no progress is shown. When > > I start the upload the progress bar says 0%, when the upload is finished > > the progress bar jumps from 0% to 100% without showing progress in the > > mean time. I have no idea what I could be doing wrong. Has anyone here > > encountered the same problems? > > > > I''m running OSX 10.4.8. Could that be the problem? I tried it with just > > Mongrel and with Mongrel + Apache, both behave the same way. > > > > Any suggestions?? Thanks in advance. > > > > Mischa. > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > > > -- > Matt White > ----------------------- > Thermal Creative > http://blog.thermalcreative.com-- Matt White ----------------------- Thermal Creative http://blog.thermalcreative.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 -~----------~----~----~----~------~----~------~--~---
Mischa Berger
2006-Nov-26 10:10 UTC
Re: Mongrel upload progress jumps from 0% to 100% (no progre
Thanks Matt, The error I''m getting is the following: NoMethodError in FilesController#progress undefined method `check'' for Mongrel::Uploads:Class this is what my controller looks like: class FilesController < ApplicationController session :off, :only => :progress def progress render :update do |page| @status = Mongrel::Uploads.check(params[:upload_id]) page.upload_progress.update(@status[:size], @status[:received]) if @status end end def upload render :text => %(UPLOADED: #{params.inspect}.<script type="text/javascript">window.parent.UploadProgress.finish();</script>) end end Do I need to require Mongrel or something?? Any ideas? As far a I can see I follow the instructions to the point, but I''m sure if missed something... Thanks again. Mischa. -- 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 -~----------~----~----~----~------~----~------~--~---
Mischa Berger
2006-Nov-26 11:01 UTC
Re: Mongrel upload progress jumps from 0% to 100% (no progre
OK, I got it working... the solution was: sudo gem cleanup I guess my controller was looking at some old code I used to try to get it working earlier. Mischa. -- 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 -~----------~----~----~----~------~----~------~--~---
Matt White
2006-Nov-27 00:35 UTC
Re: Mongrel upload progress jumps from 0% to 100% (no progre
Interesting... Perhaps it was starting an old version of Mongrel or something. Glad you got it working! Matt On 11/27/06, Mischa Berger <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > OK, I got it working... the solution was: sudo gem cleanup > > I guess my controller was looking at some old code I used to try to get > it working earlier. > > Mischa. > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Matt White ----------------------- Thermal Creative http://blog.thermalcreative.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 -~----------~----~----~----~------~----~------~--~---
Mischa Berger wrote:> OK, I got it working... the solution was: sudo gem cleanup > > I guess my controller was looking at some old code I used to try to get > it working earlier. > > Mischa.We had the same problem, and we did gem clean up which didn''t help very much. the actual problem was that we didn''t use the same upload_id in the form and the AJAX updater. stupid :) -- 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 -~----------~----~----~----~------~----~------~--~---