<NME> router.rb
<BEF> # encoding: utf-8

require "rango" # for helpers

module Rango
  module Exceptions
    class RouterNotInitialized < StandardError; end
  end

  module UrlHelper
    # url(:login)
    def url(*args)
      raise NotImplementedError, "Your router or your router adapter doesn't support this method"
    end
  end

  Helpers.send(:include, UrlHelper)

  class Router
    @@routers ||= Hash.new
    def self.app
      @@app
    rescue NameError
    rescue NameError
      raise "You have to run Rango::Router.use(router_name) first!"
    end

    def self.router=(router)
      @@router = router
    end

    def self.implement(router, &block)
      @@routers[router] = block
    end

    def self.use(router)
      require_relative "router/adapters/#{router}"
      Rango.logger.debug("Using router #{router}")
      @@router = router
    end

    def self.set_rack_env(env)
      unless env["rango.router.params"]
        @@routers[self.router].call(env)
      end
    end
  end
end

<MSG> Warn if someone is trying to use Rango::Router#set_rack_env but Rango::Router.use wasn't called yet

<DFF> @@ -24,5 +24,9 @@ module Rango
       define_method(:set_rack_env, @@routers[router])
       @@router = router
     end
+
+    def set_rack_env(env)
+      raise "You have to run Rango::Router.use(router_name) before you use Rango::Router#set_rack_env!"
+    end
   end
 end

Warn if someone is trying to use Rango::Router#set_rack_env but Rango::Router.use wasn't called yet