Rack Middleware support for Rails 2.0.2? If not what is the alternative to implement similar functio

Hello all,

I am using Rails 2.0.2 and Ruby 1.8.7 and I need to make use of rack
middleware for integrating an ajax file upload plugin(https://
github.com/valums/file-uploader) with paperclip in Rails( As given in
this tutorial:-

I have referred to the rack-middleware Railscast by Ryan B.(http://
railscasts.com/episodes/151-rack-middleware). I accordingly tried out
a rake middleware command in my config env. to check out the
middleware available wrt my rails app.

I go the following message/details:-

[email protected]:~/pocs_tried_for_use/postimage_poc3$ rake

middleware --trace
(in /home/mohnish/UP/pocs_tried_for_use/postimage_poc3)
rake aborted!
Don’t know how to build task ‘middleware’
rake.rb:1728:in []' /home/mohnish/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/ rake.rb:2050:ininvoke_task’
rake.rb:2029:in top_level' /home/mohnish/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/ rake.rb:2029:ineach’
rake.rb:2029:in top_level' /home/mohnish/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/ rake.rb:2068:instandard_exception_handling’
rake.rb:2023:in top_level' /home/mohnish/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/ rake.rb:2001:inrun’
rake.rb:2068:in standard_exception_handling' /home/mohnish/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/ rake.rb:1998:inrun’
/home/mohnish/.rvm/gems/ruby-1.8.7-p334/bin/rake:19:in `load’
[email protected]:~/UP/pocs_tried_for_use/postimage_poc3$

From this, in a way it looks like the Rails version I am using didn’t
have support for rack middleware. I am not really sure where can I
exactly verify the same.

Also, if the same is true is there an alternative to it that I can
use ?. I have seen params of env(environment related) being passed as
part of metal.rb… Can I use Rails Metal in my case.

It would be great if some one can guide me how exactly to use Rails
Metal if applicable to my case as an alternative wrt the blog tutorial
or even in general for that matter.

Thank you very much…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs