{"record":{"id":"c26d9b4440a165a3","repo":"padrino/padrino-framework","slug":"unable-to-locate-app-for-app-class-try-with","errorCode":null,"errorMessage":"Unable to locate app for '#{app_class}', try with app_class: 'MyAppClass'","messagePattern":"Unable to locate app for '#(.+?)', try with app_class: 'MyAppClass'","errorType":"exception","errorClass":"Padrino::Mounter::MounterException","httpStatus":null,"severity":"error","filePath":"padrino-core/lib/padrino-core/mounter.rb","lineNumber":223,"sourceCode":"      Padrino.modules.each { |mod| candidates << mod.root(simple_name, 'app.rb') if mod.name == mod_name }\n      candidates << Padrino.root('app', 'app.rb')\n      candidates.find { |candidate| File.exist?(candidate) }\n    end\n\n    ###\n    # Raises an exception unless app_file is located properly.\n    #\n    def ensure_app_file!\n      message = \"Unable to locate source file for app '#{app_class}', try with app_file: '/path/app.rb'\"\n      raise MounterException, message unless @app_file\n    end\n\n    ###\n    # Raises an exception unless app_obj is defined properly.\n    #\n    def ensure_app_object!\n      message = \"Unable to locate app for '#{app_class}', try with app_class: 'MyAppClass'\"\n      raise MounterException, message unless @app_obj\n    end\n  end\n\n  class << self\n    attr_writer :mounted_root # Set root directory where padrino searches mounted apps\n\n    ##\n    # @param [Array] args\n    #\n    # @return [String]\n    #   the root to the mounted apps base directory.\n    #\n    def mounted_root(*args)\n      Padrino.root(@mounted_root ||= '', *args)\n    end\n\n    ##\n    # @return [Array]","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/padrino/padrino-framework/blob/167044f3d56b2bce12f943eb826fdb0b0ea94375/padrino-core/lib/padrino-core/mounter.rb#L205-L241","documentation":"Error \"Unable to locate app for '#{app_class}', try with app_class: 'MyAppClass'\" thrown in padrino/padrino-framework.","triggerScenarios":"Thrown at padrino-core/lib/padrino-core/mounter.rb:223 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"167044f3d56b2bce12f943eb826fdb0b0ea94375","analyzedAt":"2026-08-23T12:41:41.049Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}