Wes Gamble
2006-Sep-25 21:40 UTC
Managing requests for static content in WEBrick and Mongrel
All, Is there a way to set things up so that requests for static files in either WEBrick or Mongrel will just cause a regular HTTP request and not cause the dynamic routing-based invocation to occur? I had an issue where a request for a missing .js file was causing another request to be registered, thus blowing away my flash data. I tried to do this in my routing file, but I don''t think it is helping: map.connect ''javascripts/*stuff'' map.connect ''stylesheets/*stuff'' Is there even a notion of separating static from dynamic content within the WEBrick or Mongrel environments? If so, how is it achieved? Thanks, Wes -- 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 -~----------~----~----~----~------~----~------~--~---
Vishnu Gopal
2006-Sep-26 08:17 UTC
Re: Managing requests for static content in WEBrick and Mongrel
These are instances when a "higher up in the order" webserver would shine. Try routing from lighty to mongrel and then setting up conditional redirect rules there. You can also set up an asset host: config.action_controller.asset_host = "http://myassets.x.com" (in environments/production.rb) Vish On 9/26/06, Wes Gamble <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > All, > > Is there a way to set things up so that requests for static files in > either WEBrick or Mongrel will just cause a regular HTTP request and not > cause the dynamic routing-based invocation to occur? > > I had an issue where a request for a missing .js file was causing > another request to be registered, thus blowing away my flash data. > > I tried to do this in my routing file, but I don''t think it is helping: > > map.connect ''javascripts/*stuff'' > map.connect ''stylesheets/*stuff'' > > Is there even a notion of separating static from dynamic content within > the WEBrick or Mongrel environments? If so, how is it achieved? > > Thanks, > Wes > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2006-Sep-26 15:12 UTC
Re: Managing requests for static content in WEBrick and Mong
Vish, Thanks. I''m good in production right now (although using Apache - need to move to lighty or something else). I''m wondering if I can control the development Web server to this extent though. Wes -- 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 -~----------~----~----~----~------~----~------~--~---