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