Created
April 28, 2010 08:44
-
-
Save vast/381881 to your computer and use it in GitHub Desktop.
Interactive console for sinatra + activerecord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'my-sinatra-app' | |
require 'sinatra/activerecord/rake' | |
desc "run irb console" | |
task :console, :environment do |t, args| | |
ENV['RACK_ENV'] = args[:environment] || 'development' | |
exec "irb -r irb/completion -r my-sinatra-app" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can also try http://rubygems.org/gems/tux