def boot_rails
      logger.info "Loading Rails environment: #{environment}"
      RocketJob.rails!

      boot_file = Pathname.new(directory).join('config/environment.rb').expand_path
      require(boot_file.to_s)

      begin
        require 'rails_semantic_logger'
      rescue LoadError
        raise "Add the following line to your Gemfile when running rails:\n gem 'rails_semantic_logger'"
      end

      # Override Rails log level if command line option was supplied
      SemanticLogger.default_level = log_level.to_sym if log_level

      return unless Rails.configuration.eager_load

      logger.measure_info('Eager loaded Rails and all Engines') do
        Rails.application.eager_load!
        Rails::Engine.subclasses.each(&:eager_load!)
        self.class.eager_load_jobs(File.expand_path('jobs', File.dirname(__FILE__)))
      end
    end
def boot_rails
      logger.info "Loading Rails environment: #{environment}"
      RocketJob.rails!

      boot_file = Pathname.new(directory).join('config/environment.rb').expand_path
      require(boot_file.to_s)

      begin
        require 'rails_semantic_logger'
      rescue LoadError
        raise "Add the following line to your Gemfile when running rails:\n gem 'rails_semantic_logger'"
      end

      # Override Rails log level if command line option was supplied
      SemanticLogger.default_level = log_level.to_sym if log_level

      return unless Rails.configuration.eager_load

      logger.measure_info('Eager loaded Rails and all Engines') do
        Rails.application.eager_load!
        Rails::Engine.subclasses.each(&:eager_load!)
        self.class.eager_load_jobs(File.expand_path('jobs', File.dirname(__FILE__)))
      end
    end
Initialize the Rails environment
 Returns [true|false] whether Rails is present