OpenLayers and Rails: how to set up a ProxyHost?

Dear all,

I’m using OpenLayers (and GeoExt) to embed an interactive map in a rails
application. Things work pretty well with WMS requests, but now I’d need
to implement a GetFeatureInfo feature. This requires the XMLHTTPRequest
object, through which requests to remote servers are not allowed. Read
the details here:

http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost

Usually, this limitation is worked around with the set up of a cgi
script in the web server that works as proxy. The question then is how
can this made with Rails? Can somehow Rails run a cgi? Or somehow make a
view work as a proxy?

Thank you,

Luís