A comment first: you should avoid having several minutes requests (you should use background processing).
Now, depending of what you are actually doing in that request, the standard method is to interrogate the server (throught an ajax repetitive request, other than the current request) about the progress of current task.
You can do this by using the periodically_call_remote function.
To have an idea:
In your view:
<%= periodically_call_remote(
:condition => "check_var == false",
:frequency => 3,
:url => { :action => "evaluate_progress" }) %>
In your controller:
def evaluate_progress
# replace it with code that actually computes the progress
done = 0.6
render :update do |page|
if(done == 1)
page << "check_var = false" #To stop querying the server
else
page << "check_var = true"
page.replace_html('your_div_id', "The task is #{done*100}% complete.")
end
end
end
Again, this is just a proof of concept, i haven't tested it. The actual code depends also on what you are actually doing in the long-lasting request.