Skip to content

Instantly share code, notes, and snippets.

@moudy
Created February 11, 2013 20:11
Show Gist options
  • Save moudy/4757197 to your computer and use it in GitHub Desktop.
Save moudy/4757197 to your computer and use it in GitHub Desktop.
# load rails or RACK app if runnning pry in a project
if Dir.exists? './config'
current_app = './config/application.rb' if File.exists? './config/application.rb'
current_app = './config/environment.rb' if File.exists? './config/environment.rb'
require current_app if current_app
end
if defined? Rails && Rails.version[0..0] == "3"
require 'rails/console/app'
require 'rails/console/helpers'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment