Module: IRuby::Rails
- Defined in:
- lib/iruby/rails.rb
Class Method Summary collapse
Class Method Details
.load(env = nil, sandbox = false, root = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/iruby/rails.rb', line 8 def load(env = nil, sandbox = false, root = nil) root ||= Dir.pwd # RAILS_ENV needs to be set before config/application is required ENV['RAILS_ENV'] ||= env || 'development' require File.('config/boot', root) app_path = File.('config/application', root) require_application_and_environment!(app_path) setup_console(::Rails.application, sandbox) end |