INNER CODE UNIT · Ruby
rails
reidmorrison/rocketjob · lib/rocket_job/cli.rb:60
def rails?
@rails ||=
begin
boot_file = Pathname.new(directory).join("config/environment.rb").expand_path
boot_file.file?
end
end
# Initialize the Rails environment
# Returns [true|false] whether Rails is present
def boot_rails
logger.info "Loading Rails environment: #{environment}"
RocketJob.rails!
require "rails"
require "rocket_job/railtie"
boot_file = Pathname.new(directory).join("config/environment.rb").expand_path
require(boot_file.to_s)