Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Created July 19, 2011 19:31
Show Gist options
  • Save rbarazi/1093492 to your computer and use it in GitHub Desktop.
Save rbarazi/1093492 to your computer and use it in GitHub Desktop.
Console script for a stand alone gem/app
require 'bundler'
Bundler.require
# Require your gem/lib
# require 'mygem'
require 'irb'
task :console do
# Connect and load the db
# ENV["RACK_ENV"] = 'development'
# Mongoid.load!("config/database.yml")
# Clear the args so IRB doesn't listen to them
ARGV.clear
IRB.start
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment