Skip to content

Instantly share code, notes, and snippets.

@samnang
Created January 2, 2011 02:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samnang/762205 to your computer and use it in GitHub Desktop.
Save samnang/762205 to your computer and use it in GitHub Desktop.
Tips – Simulate Rails Console in Ruby Project
#!/usr/bin/env ruby
app_path = File.expand_path("../", File.dirname(__FILE__))
boot_path = File.join(app_path,"boot")
command = "irb -r irb/completion -r #{boot_path}"
exec command
require 'irb'
ARGV.clear
IRB.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment