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>