Skip to content

Instantly share code, notes, and snippets.

@maiha
Created February 5, 2010 20:47
Show Gist options
  • Save maiha/296211 to your computer and use it in GitHub Desktop.
Save maiha/296211 to your computer and use it in GitHub Desktop.
% vi Thorfile
...
desc "console ENV", "Start Monk console in the supplied environment"
def console(env = ENV["RACK_ENV"] || "development")
verify_config(env)
exec "env RACK_ENV=#{env} irb -r init -Ku"
end
...
% thor monk:console
irb(main):001:0> User.count
=> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment