Tuesday, March 28, 2006

Rails 1.1, "enable_upload_progress"

Rails 1.1 was released, and with it the functionality for the "Ajax" (ug, I hate that word) file upload progress bar was turned into a plugin. I am posting this just in case someone followed one of the 1 million "how to upload files" in Rails tutorials and can't figure out why they're seeing the following errors:

config/environment.rb:59: undefined method `enable_upload_progress' for ActionController?::Base:Class (NoMethodError?) from

All you need to do is remove the offending line in their environment.rb file, and run the following command from your rails project root:

script/plugin install upload_progress

Everything should work perfectly. (Mine does. :))

("Thanks" to this blog post.)

5 Comments:

Anonymous Anonymous said...

Hi Sica,

Spent a few hours looking for this solution... Many thanks, it helped me a lot.

Regards,
Fabrice.

Wednesday, July 19, 2006 5:10:00 PM  
Anonymous Anonymous said...

Sorry, I wanted to write: Hi Michael :)

Fabrice.

Wednesday, July 19, 2006 5:11:00 PM  
Blogger Michael Sica said...

Glad I could help!

Wednesday, July 19, 2006 7:16:00 PM  
Anonymous Anonymous said...

Thanks so much, this was required to get the open source wiki software Hieraki2 working.

Tuesday, April 17, 2007 2:41:00 AM  
Blogger Michael Sica said...

No problem.

Just an update - I'm not using FastCGI anymore, so I've had to switch to using the mongrel version. More info here: http://mongrel.rubyforge.org/docs/upload_progress.html

Tuesday, April 17, 2007 8:48:00 PM  

Post a Comment

<< Home