-
Notifications
You must be signed in to change notification settings - Fork 0
/
pryrc
29 lines (24 loc) · 971 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
25
26
27
28
29
# write .pryrc
# Load plugins (only those I whitelist)
#Pry.config.should_load_plugins = false
Pry.plugins["doc"].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 :)
#willams note: I like doing it this way on jruby so you dont have to have an extra java process taking up memory just run the pry console. you can call it directly
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'
else
warn "[WARN] cannot load Rails console commands (Not on Rails2 or Rails3?)"
end
end
if defined?(Rails) && Rails.env
extend Rails::ConsoleMethods
end