Add this code to environment.rb at bottom (after all other things are loaded): # Generate routes now... JavascriptRoutes.generate(:lite => ENV['ROUTES_JS_LITE'])