For the last hours i''ve tried to get the Upload progress plugin to work
by following the tutorial:
http://mongrel.rubyforge.org/docs/upload_progress.html
Now i have two problems.
1. There isnt any file beeing uploaded, maybe this is because i didnt
create the folder where it should upload (i''ve tried multiple locations
but i cant be 100% sure as to where) or its because of problem 2.
2. NameError (uninitialized constant Mongrel::Upload):
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:266:in
`load_missing_constant''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:452:in
`const_missing''
/app/controllers/files_controller.rb:10:in
`__bind_1171288653_854000''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/object/extending.rb:44:in
`[]''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/object/extending.rb:44:in
`instance_exec''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/helpers/prototype_helper.rb:313:in
`initialize''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/base.rb:769:in
`new''
Now the 2nd error really got me beat, i''ve installed the plugin... yet
it still gives me this error in the log...
Now this is only the first couple of lines of the error i recieve but
thats usually where the problem is.
Anyone out there have any idea what the problem could be? Another thing
that happens is that (just like in another thread on these boards) the
progress bar goes from 0% instantly to 100% when its done, it doesnt
show any progress at all. But i suspect that this is all related to
problem #2
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Did you load the plugin using mongrel_rails start -S <path to config file> where config file is as described in: http://mongrel.rubyforge.org/docs/upload_progress.html ? Vish On 2/12/07, F.B. ten Kate <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > For the last hours i''ve tried to get the Upload progress plugin to work > by following the tutorial: > http://mongrel.rubyforge.org/docs/upload_progress.html > > Now i have two problems. > > 1. There isnt any file beeing uploaded, maybe this is because i didnt > create the folder where it should upload (i''ve tried multiple locations > but i cant be 100% sure as to where) or its because of problem 2. > > 2. NameError (uninitialized constant Mongrel::Upload): > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:266:in > `load_missing_constant'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:452:in > `const_missing'' > /app/controllers/files_controller.rb:10:in > `__bind_1171288653_854000'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/object/extending.rb:44:in > `[]'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/object/extending.rb:44:in > `instance_exec'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/helpers/prototype_helper.rb:313:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/base.rb:769:in > `new'' > > Now the 2nd error really got me beat, i''ve installed the plugin... yet > it still gives me this error in the log... > > Now this is only the first couple of lines of the error i recieve but > thats usually where the problem is. > > Anyone out there have any idea what the problem could be? Another thing > that happens is that (just like in another thread on these boards) the > progress bar goes from 0% instantly to 100% when its done, it doesnt > show any progress at all. But i suspect that this is all related to > problem #2 > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Vishnu Gopal wrote:> Did you load the plugin using mongrel_rails start -S <path to config > file> where config file is as described in: > http://mongrel.rubyforge.org/docs/upload_progress.html ? > > VishI thought i was, after looking at the example on the tutorial: mongrel_rails -d -p 3000 -S config/mongrel_upload_progress.conf Which wouldnt work i tried: mongrel_rails start "config/mongrel_upload_progress.conf" forgetting the -S, either way it works now!!! thanks alot for the help :-) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Actually, the progress part of the script is currently working, yet nothing is beeing uploaded, this might be because i have absolutely no idea where it''s trying to upload the files to. My best gues was "public/files/upload/" If this is the case do i need to change the folder premitions before this starts working? (note i run a Windows Vista system atm) F.B. ten Kate -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It''s uploading to a temporary directory (Windows/Temp probably, check your TEMP environment variable) and it''s available under the controller you post to as a regular Rails TempFile or StringIO variable. Do something like params[:file].read to get the file contents. It''s up to you to do whatever you want with this file. FileUtils.mv will move it to the location of your choice. Later, Vish On 2/13/07, F.B. ten Kate <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Actually, the progress part of the script is currently working, yet > nothing is beeing uploaded, this might be because i have absolutely no > idea where it''s trying to upload the files to. > > My best gues was "public/files/upload/" If this is the case do i need to > change the folder premitions before this starts working? > > (note i run a Windows Vista system atm) > > F.B. ten Kate > > -- > Posted via http://www.ruby-forum.com/. > > > >s'' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---