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

and the browser tries to search your .dev domain on the web…

When I use Google Chrome or Safari with Pow and type in a .dev URL (Pow top-level domains), there are some conditions why the browser tries to search the web for the text of the URL instead of going to the URL.  Continue reading “and the browser tries to search your .dev domain on the web…”