Hi
Is there some definitive guide for upload progress plugin ? We have in
this mailing list a lot of testimonials, bug reports, bug fixes, but
there are still people like me who cannot use it correctly.
Here is my config:
- mongrel 1.0RC and upload progress plugin 0.2.1
- a 6 mongrels cluster
- config/mongrel_upload_progress.conf:
uri "/",
:handler => plugin("/handlers/upload",
:path_info => ''/upload/index'',
:frequency => 1,
:drb => ''druby://0.0.0.0:2999''),
:in_front => true
- After each cap deployment I manually launch ruby
www/current/lib/upload.rb (yes that sucks)
require ''rubygems''
require ''fastthread''
require ''drb''
require ''gem_plugin''
GemPlugin::Manager.instance.load ''mongrel'' =>
GemPlugin::INCLUDE
DRb.start_service ''druby://0.0.0.0:2999'',
Mongrel::UploadProgress.new
DRb.thread.join
And all I get during upload ajax process are raised errors: "A
NameError occurred in upload#progress: uninitialized constant
Mongrel::Uploads". Status remains at 0% and picture is uploaded.
The DRb client always lists an empty array during uploads (get_status.list).
And in the rails controller I tried:
def progress
render :update do |page|
@status = Mongrel::Uploads.instance.check(params[:upload_id])
page.upload_progress.update(@status[''size''],
@status[''received'']) if @status
end
end
as well as the "original"
def progress
render :update do |page|
page.upload_progress.update @status[:size], @status[:received]
end if @status = Mongrel::Uploads.check(params[:upload_id])
end
Any idea ?
Thanks for your help
This might sound dumb, but are you 100% sure you got the upload progress plugin installed? I had that exact same error when I tried launching a site on a new system and forgot to install the plugin. On 12/25/06, Eugenol <eugenol at gmail.com> wrote:> Hi > > Is there some definitive guide for upload progress plugin ? We have in > this mailing list a lot of testimonials, bug reports, bug fixes, but > there are still people like me who cannot use it correctly. > > Here is my config: > - mongrel 1.0RC and upload progress plugin 0.2.1 > - a 6 mongrels cluster > - config/mongrel_upload_progress.conf: > > uri "/", > :handler => plugin("/handlers/upload", > :path_info => ''/upload/index'', > :frequency => 1, > :drb => ''druby://0.0.0.0:2999''), > :in_front => true > > - After each cap deployment I manually launch ruby > www/current/lib/upload.rb (yes that sucks) > > require ''rubygems'' > require ''fastthread'' > require ''drb'' > require ''gem_plugin'' > GemPlugin::Manager.instance.load ''mongrel'' => GemPlugin::INCLUDE > DRb.start_service ''druby://0.0.0.0:2999'', Mongrel::UploadProgress.new > DRb.thread.join > > > > And all I get during upload ajax process are raised errors: "A > NameError occurred in upload#progress: uninitialized constant > Mongrel::Uploads". Status remains at 0% and picture is uploaded. > > The DRb client always lists an empty array during uploads (get_status.list). > > And in the rails controller I tried: > def progress > render :update do |page| > @status = Mongrel::Uploads.instance.check(params[:upload_id]) > page.upload_progress.update(@status[''size''], > @status[''received'']) if @status > end > end > > as well as the "original" > > def progress > render :update do |page| > page.upload_progress.update @status[:size], @status[:received] > end if @status = Mongrel::Uploads.check(params[:upload_id]) > end > > > > Any idea ? > > Thanks for your help > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- EPA Rating: 3000 Lines of Code / Gallon (of coffee)
On 12/26/06, Carl Lerche <carl.lerche at gmail.com> wrote:> This might sound dumb, but are you 100% sure you got the upload > progress plugin installed? I had that exact same error when I tried > launching a site on a new system and forgot to install the plugin. >Of course I am :) I wasn''t alone on irc last night with the same problem. The issue was to launch Drb at 12.0.0.1:2999 , not 0.0.0.0:2999 (running FreeBSD 6.1)
I am hoping you really meant localhost aka 127.0.0.1 :) On 12/26/06, Eugenol <eugenol at gmail.com> wrote:> > On 12/26/06, Carl Lerche <carl.lerche at gmail.com> wrote: > > This might sound dumb, but are you 100% sure you got the upload > > progress plugin installed? I had that exact same error when I tried > > launching a site on a new system and forgot to install the plugin. > > > > Of course I am :) > > I wasn''t alone on irc last night with the same problem. The issue was > to launch Drb at 12.0.0.1:2999 , not 0.0.0.0:2999 (running FreeBSD > 6.1) > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061226/16416454/attachment.html