Revision 300dd8a7
Added by Dominic Cleal almost 8 years ago
config/application.rb | ||
---|---|---|
end
|
||
|
||
def self.setup_console
|
||
Wirb.start
|
||
Hirb.enable
|
||
rescue
|
||
warn "Failed to load console gems, starting anyway"
|
||
ensure
|
||
ENV['IRBRC'] = File.expand_path('../irbrc', __FILE__)
|
||
puts "For some operations a user must be set, try User.current = User.first"
|
||
end
|
||
end
|
config/irbrc | ||
---|---|---|
begin
|
||
Wirb.start
|
||
Hirb.enable
|
||
rescue
|
||
warn 'Failed to load console gems, starting anyway'
|
||
end
|
Also available in: Unified diff
fixes #14913 - configure Hirb/Wirb via irbrc
Wirb 2.x can't be started before the IRB session itself, so use an irbrc
file per its docs to activate it and Hirb when starting a console.
(cherry picked from commit b28c934be39bce48a2e7ed48d3093557903193d6)