In script/console you can access url_for, named route url generation methods, and
restful url generators using the app variable. It works like so:
>> app.url_for(:controller => "home", :action => "index")
=> "http://www.example.com/home"
That is great. But what if you need to do that in a script that you want to run using script/runner?
It turns out that is easy too. You just need to require 'console_app' (in Rails 2.*) like so:
require 'console_app'