Skip to content

Instantly share code, notes, and snippets.

@codeinvain
Created August 26, 2011 07:07
Show Gist options
  • Save codeinvain/1172869 to your computer and use it in GitHub Desktop.
Save codeinvain/1172869 to your computer and use it in GitHub Desktop.
rails/pry integration ("rails p" to run rails in pry console)
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
unless ARGV.empty? then
if ARGV[0] == 'pry' || ARGV[0] == 'p' then
system("pry -r #{File.expand_path('./config/environment')}")
exit
end
end
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment