Using spring with pow!

The other day I was a bit sad for I was aware that pow (the web server) wasn’t leveraging spring (the Rails preloader) with its fast load times.

Fixing config.ru

Luckily this deficiency is easily fixed by adding the spring snippet to your config.ru:

# This file is used by Rack-based servers to start the application.

begin
  load File.expand_path('../bin/spring', __FILE__)
rescue LoadError
end

require ::File.expand_path('../config/environment',  __FILE__)
run Rails.application

Leave a Reply

Please Login to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.