This works fine with the default Webrick. But, if you're running under Mongrel (say), you probably want to customize this in config/environments/production.rb .