<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi Greg, yes, because the start action in the files controller has no layout, the mup.js javascript is not being included. Without this, the progress bar isn't displayed at all, even at 0%. So you have to either remove :layout => :none from the start action in controllers/files.rb, or remove the <% throw_content :header %><% end %> wrapper around the CSS and javascript include in views/files/start.herb.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV>Mike</DIV><DIV><BR class="khtml-block-placeholder"><DIV><DIV><DIV><DIV><DIV>On 15 May 2007, at 20:24, Gregory O'Connor wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Hi Mike,<DIV>i've just tried mrblog revision222 and wonder if you had to modify anything other than dist/conf/merb_init.rb and dist/conf/merb.yml to get the upload progress to work?</DIV><DIV>thanks,</DIV><DIV>greg</DIV><DIV><BR><DIV><DIV>On May 15, 2007, at 10:03 AM, Mike Evans wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">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> <<A href="mailto:mike@harmonypark.net">mike@harmonypark.net</A>> 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 <% throw_content :header %>, but the files/start action is<BR>rendered without a layout. Removing either the throw_content or<BR>the :layout => :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"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"} <BR>1179176946: Added<BR>1179176946: Finished<BR>{"action"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"}<BR>1179176946: Added<BR>1179176946: Finished <BR>{"action"=>"progress", "controller"=>"files", "upload_id"=>"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>> Mike-<BR>><BR>> What version of mongrel do you have installed? This error looks <BR>> like you have an outdated mongrel. Install mongrel 1.0.1 an d this<BR>> will go away.<BR>><BR>> Cheers-<BR>><BR>> -Ezra<BR>><BR>><BR>> On May 14, 2007, at 10:16 AM, Mike Evans wrote:<BR>> <BR>>> Hi, first off thanks Ezra for Merb - it's certainly interesting and<BR>>> I'm keen to have a play. However, I'm having difficulties in getting<BR>>> started. I've followed the docs for setting up mrblog and everything <BR>>> seems to be installed correctly, and merb appears to start fine:<BR>>><BR>>> $ merb<BR>>> you must install the markaby gem to use .mab templates<BR>>> you must install the haml gem to use .haml templates <BR>>> ActiveRecord session mixed in<BR>>> Rails session compatibilty on.<BR>>> Compiling routes..<BR>>> merb init called<BR>>> Merb started with these options:<BR>>> ---<BR>>> :dist_root: /path/to/merb/mrblog/dist <BR>>> :allow_reloading: true<BR>>> :environment: development<BR>>> :merb_root: /path/to/merb/mrblog<BR>>> :cache_templates: true<BR>>> :use_mutex: true<BR>>> :config: dist/conf/mup.conf <BR>>> :host: <A href="http://127.0.0.1">127.0.0.1</A><BR>>> :show_error: true<BR>>> :port: "4000"<BR>>> :sql_session: true<BR>>><BR>>><BR>>> However any request to <A href="http://127.0.0.1:4000"> 127.0.0.1:4000</A> returns:<BR>>><BR>>> Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for<BR>>> #<MerbUploadHandler:0x234bcfc><BR>>><BR>>> with nothing in the browser or in the log. Similarly, using a newly <BR>>> generated test app, I get:<BR>>><BR>>> Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for<BR>>> nil:NilClass<BR>>><BR>>><BR>>> I've tried both installing via gem and from trunk. Without a trace <BR>>> and a line number it's hard to know where to start. Am I missing<BR>>> something really obvious here? It's been known to happen before...<BR>>> Any help much appreciated!<BR>>><BR>>> Cheers, <BR>>> Mike<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>><BR>> -- Ezra Zygmuntowicz-- Lead Rails Evangelist<BR>> -- <A href="mailto:ez@engineyard.com">ez@engineyard.com</A><BR>> -- Engine Yard, Serious Rails Hosting <BR>> -- (866) 518-YARD (9273)<BR>><BR>><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><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></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></DIV></BODY></HTML>