Welcome Guest | Login

Mongrel Upload Progress Plugin and handlers

I am trying to get this last peice of code running from what otherwise has been a nice smooth install thus far *knock on wood*
This is the upload progress bar that "should" come default in rails but sadly does not.http://mongrel.rubyforge.org/docs/upload_progress.html

My issue is that in the console it can not find the handelers plugin
** Loading config/mongrel_upload_progress.conf external config script
/usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.2/lib/gem_plugin.rb:163:in `create': Plugin category /handlers does not exist (RuntimeError)

my conf file is
# config/mongrel_upload_progress.conf
uri "/",
 :handler => plugin("/handlers/upload", :path_info => '/file/do_the_upload'),
 :in_front => true            

Thats about it. I froze my gems but maybe I missed something silly more or less

2007-06-26 01:48 PM

hmm - I'm not sure if you can pull that off from the console.  When you load mongrel you need to add the "-S config/mongrel_upload_progress.conf" - "That config file tells mongrel to load the Upload handler in front of all other handlers"

I'd say give it a go with a loaded mongrel and test it there.  (And as the article suggests, if you're running multiple mongrels you'll need to kick this out to a DRb process)    

2007-06-26 04:13 PM

So far it is just me testing the progress bar. Here is my start command
mongrel_rails start -e production -p **** -S config/mongrel_upload_progress.conf

I re-instaled the gems so it seems to be kinda happy
But still no progressbar


** Starting Mongrel listening at 0.0.0.0:****
** Starting Rails with production environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Loading config/mongrel_upload_progress.conf external config script
** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no restart).
** Rails signals registered.  HUP => reload (without restart).  It might not work well.
** Mongrel available at 0.0.0.0:****
** Use CTRL-C to stop.

2007-06-26 04:18 PM

How do you know the progress bar isn't working?  Can you paste the relevant code/errors?  

Also - you should add a -d to run mongrel as a daemon...

2007-06-26 04:22 PM

Because when I hauk largeish files at it (like 3 meg) it does not disply until the end of the upload . I am trying -d now with no effect
mongrel_rails start -e production -p **** -d -S config/mongrel_upload_progress.conf

let me download the errors *one sec*

2007-06-26 04:33 PM

Log file

** Daemonized, any open files are closed.  Look at log/mongrel.pid and log/mongrel.log for info.
** Starting Mongrel listening at 0.0.0.0:****
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE)
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/tcphack.rb:12:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:560:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:560:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:128:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:128:in `listener'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:98:in `cloaker_'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `call'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
from /usr/local/bin/mongrel_rails:16:in `load'
from /usr/local/bin/mongrel_rails:16

2007-06-26 04:43 PM

"Address already in use" -- ahh, make sure all your mongrel_rails processes are killed off and restart your server -- if you're still getting this error then you should try to add a 1 to the end of your port or contact support to get it sorted.    

2007-06-26 04:50 PM

Hmm no error anymore but still no working progress bar.. I'll keep poking at it.
Thank you for your help :D if you think of something I can try please let me know

2007-06-26 05:05 PM

Hello,

Could you please post a ticket to the Support Team on this we will help you to get it fixed. Thank you

2007-06-26 09:30 PM

HostingRails Support

Hello Guest! In order to post you must be an active client with us, please log in or sign up.