You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: app_loader.rb
    path of file: ./repos/jets/lib/jets
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "pathnam
    
    def exec_app
      original_cwd = Dir.pwd

      loop do
        if exe = find_executable
          contents = File.read(exe)

          if /(APP|ENGINE)_PATH/.match?(contents)
            exec RUBY, exe, *ARGV
            break # non reachable, hack to be able to stub exec in the test suite
          elsif exe.end_with?("bin/jets") && contents.include?("This file was generated by Bundler")
            $stderr.puts(BUNDLER_WARNING)
            Object.const_set(:APP_PATH, File.expand_path("config/application", Dir.pwd))
            # Do not run Jets.boot here else -e option is not respected. IE: jets console -e production
            require "jets/commands"
            break
          end
        end