<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Nice one, thanks Rogelio - the progress bar in rev 222 works as expected.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV>Mike</DIV><DIV><BR><DIV><DIV>On 15 May 2007, at 03:21, Rogelio J. Samour wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">We're currently investigating this issue right now. If you're on trunk this is an unresolved bug. <BR><BR>If you want a progress indicator you should checkout rev 222.<BR><BR>cheerio,<BR><SPAN class="sg"><BR>Rogelio </SPAN><BR><BR><DIV><SPAN class="gmail_quote">On 5/14/07, <B class="gmail_sendername">Mike Evans</B> &lt;<A href="mailto:mike@harmonypark.net">mike@harmonypark.net</A>&gt; wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Sorry to bug everyone with newbie questions today but hopefully this<BR>one is more substantial than the last. I'm trying to get a handle on<BR>the upload progress code as found in the mrblog example. Firstly, I<BR>found that the progress bar isn't displayed given the current code in <BR>trunk, as its CSS and the link to mup.js in views/files/start.herb<BR>are inside &lt;% throw_content :header %&gt;, but the files/start action is<BR>rendered without a layout. Removing either the throw_content or<BR>the :layout =&gt; :none in the controller solves this. <BR><BR>However, for me the bar stays on 0% until the upload is complete, at<BR>which point it jumps to 100%. When uploading a 350Mb file locally, it<BR>appears that although the periodic polling occurs, the upload is<BR> considered to be finished almost immediately it begins:<BR><BR>1179176946: Added<BR>1179176946: Marking<BR>1179176946: Marking<BR>1179176946: Marking<BR>1179176946: Added<BR>1179176946: Finished<BR>{"action"=&gt;"progress", "controller"=&gt;"files", "upload_id"=&gt;"1179176946"} <BR>1179176946: Added<BR>1179176946: Finished<BR>{"action"=&gt;"progress", "controller"=&gt;"files", "upload_id"=&gt;"1179176946"}<BR>1179176946: Added<BR>1179176946: Finished <BR>{"action"=&gt;"progress", "controller"=&gt;"files", "upload_id"=&gt;"1179176946"}<BR>...<BR><BR>In reality, the upload takes a couple of minutes. (Even copying the <BR>file locally takes more than a minute.)<BR><BR>Can anyone point me in the right direction? I'm not sure where the<BR>Mongrel::Upload class is defined - I can see that the debug output<BR>above is coming from merb-0.3.1 /lib/merb/merb_upload_progress.rb as<BR>required in merb_upload_handler.rb, but I don't understand how<BR>request_progress is called to update the :size and :received<BR>counters, nor why the upload is treated as over almost before it starts. <BR><BR>I'm testing on ruby 1.8.6 on Mac OS X 10.4.9 with Mongrel 1.0.1.<BR><BR>Thanks for any help,<BR>Mike<BR><BR><BR>On 14 May 2007, at 19:30, Ezra Zygmuntowicz wrote:<BR><BR>&gt; Mike-<BR>&gt;<BR>&gt;       What version of mongrel do you have installed? This error looks <BR>&gt; like you have an outdated mongrel. Install mongrel 1.0.1 an d this<BR>&gt; will go away.<BR>&gt;<BR>&gt; Cheers-<BR>&gt;<BR>&gt; -Ezra<BR>&gt;<BR>&gt;<BR>&gt; On May 14, 2007, at 10:16 AM, Mike Evans wrote:<BR>&gt; <BR>&gt;&gt; Hi, first off thanks Ezra for Merb - it's certainly interesting and<BR>&gt;&gt; I'm keen to have a play. However, I'm having difficulties in getting<BR>&gt;&gt; started. I've followed the docs for setting up mrblog and everything <BR>&gt;&gt; seems to be installed correctly, and merb appears to start fine:<BR>&gt;&gt;<BR>&gt;&gt; $ merb<BR>&gt;&gt; you must install the markaby gem to use .mab templates<BR>&gt;&gt; you must install the haml gem to use .haml templates <BR>&gt;&gt; ActiveRecord session mixed in<BR>&gt;&gt; Rails session compatibilty on.<BR>&gt;&gt; Compiling routes..<BR>&gt;&gt; merb init called<BR>&gt;&gt; Merb started with these options:<BR>&gt;&gt; ---<BR>&gt;&gt; :dist_root: /path/to/merb/mrblog/dist <BR>&gt;&gt; :allow_reloading: true<BR>&gt;&gt; :environment: development<BR>&gt;&gt; :merb_root: /path/to/merb/mrblog<BR>&gt;&gt; :cache_templates: true<BR>&gt;&gt; :use_mutex: true<BR>&gt;&gt; :config: dist/conf/mup.conf <BR>&gt;&gt; :host: <A href="http://127.0.0.1">127.0.0.1</A><BR>&gt;&gt; :show_error: true<BR>&gt;&gt; :port: "4000"<BR>&gt;&gt; :sql_session: true<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; However any request to <A href="http://127.0.0.1:4000"> 127.0.0.1:4000</A> returns:<BR>&gt;&gt;<BR>&gt;&gt; Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for<BR>&gt;&gt; #&lt;MerbUploadHandler:0x234bcfc&gt;<BR>&gt;&gt;<BR>&gt;&gt; with nothing in the browser or in the log. Similarly, using a newly <BR>&gt;&gt; generated test app, I get:<BR>&gt;&gt;<BR>&gt;&gt; Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for<BR>&gt;&gt; nil:NilClass<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; I've tried both installing via gem and from trunk. Without a trace <BR>&gt;&gt; and a line number it's hard to know where to start. Am I missing<BR>&gt;&gt; something really obvious here? It's been known to happen before...<BR>&gt;&gt; Any help much appreciated!<BR>&gt;&gt;<BR>&gt;&gt; Cheers, <BR>&gt;&gt; Mike<BR>&gt;&gt; _______________________________________________<BR>&gt;&gt; Merb-devel mailing list<BR>&gt;&gt; <A href="mailto:Merb-devel@rubyforge.org">Merb-devel@rubyforge.org</A><BR>&gt;&gt; <A href="http://rubyforge.org/mailman/listinfo/merb-devel"> http://rubyforge.org/mailman/listinfo/merb-devel</A><BR>&gt;<BR>&gt; -- Ezra Zygmuntowicz-- Lead Rails Evangelist<BR>&gt; -- <A href="mailto:ez@engineyard.com">ez@engineyard.com</A><BR>&gt; -- Engine Yard, Serious Rails Hosting <BR>&gt; -- (866) 518-YARD (9273)<BR>&gt;<BR>&gt;<BR><BR>_______________________________________________<BR>Merb-devel mailing list<BR><A href="mailto:Merb-devel@rubyforge.org">Merb-devel@rubyforge.org</A><BR><A href="http://rubyforge.org/mailman/listinfo/merb-devel"> http://rubyforge.org/mailman/listinfo/merb-devel</A><BR></BLOCKQUOTE></DIV><BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Merb-devel mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Merb-devel@rubyforge.org">Merb-devel@rubyforge.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://rubyforge.org/mailman/listinfo/merb-devel">http://rubyforge.org/mailman/listinfo/merb-devel</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>