-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pryrc
24 lines (21 loc) · 846 Bytes
/
.pryrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Load plugins (only those I whitelist)
Pry.config.should_load_plugins = false
Pry.plugins["doc"].activate!
Pry.plugins["git"].activate!
# Launch Pry with access to the entire Rails stack.
# If you have Pry in your Gemfile, you can pass: ./script/console --irb=pry instead.
# If you don't, you can load it through the lines below :)
rails = File.join Dir.getwd, 'config', 'environment.rb'
if File.exist?(rails) && ENV['SKIP_RAILS'].nil?
require rails
if Rails.version[0..0] == "2"
require 'console_app'
require 'console_with_helpers'
elsif Rails.version[0..0] == "3"
require 'rails/console/app'
require 'rails/console/helpers'
extend Rails::ConsoleMethods if Gem::Version.new(Rails.version) >= Gem::Version.new("3.2.0")
else
warn "[WARN] cannot load Rails console commands (Not on Rails2 or Rails3?)"
end
end