{"record":{"id":"0d26bbbbe4be7388","repo":"padrino/padrino-framework","slug":"you-are-using-tmp-ext-and-for-admin-we-onl","errorCode":null,"errorMessage":"<= You are using '#{tmp_ext}' and for admin we only support '#{supported_ext.join(', ')}'. Please use #{supported_ext.map { |ext| \"-e #{ext}\" }.join(' or ')}","messagePattern":"<= You are using '#(.+?)' and for admin we only support '#(.+?)'\\. Please use #(.+?)\" \\}\\.join\\(' or '\\)\\}","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"padrino-admin/lib/padrino-admin/generators/admin_app.rb","lineNumber":51,"sourceCode":"      class_option :destroy,        type: :boolean, aliases: '-d', default: false\n      class_option :renderer,       type: :string,  aliases: '-e',                     desc: 'Rendering engine (erb, haml, slim)'\n      class_option :admin_model,    type: :string,  aliases: '-m', default: 'Account', desc: 'The name of model for access controlling'\n      class_option :admin_name,     type: :string,  aliases: '-a', default: 'admin',   desc: 'The admin application name and path'\n      # class_option :models_path,     desc: 'The models destination path', default: '.', type: :string\n\n      # Copies over the Padrino base admin application.\n      def create_admin\n        self.destination_root = options[:root]\n        if in_app_root?\n          unless supported_orm.include?(orm)\n            say \"<= At the moment, Padrino only supports #{supported_orm.join(' or ')}. Sorry!\", :yellow\n            raise SystemExit\n          end\n\n          tmp_ext = options[:renderer] || fetch_component_choice(:renderer)\n          unless supported_ext.include?(tmp_ext.to_sym)\n            say \"<= You are using '#{tmp_ext}' and for admin we only support '#{supported_ext.join(', ')}'. Please use #{supported_ext.map { |ext| \"-e #{ext}\" }.join(' or ')}\", :yellow\n            raise SystemExit\n          end\n\n          # Get the app's namespace.\n          @app_name = fetch_app_name\n\n          # setup admin app name\n          @admin_name = options[:admin_name].classify\n          @admin_path = options[:admin_name].underscore\n\n          store_component_choice(:admin_renderer, tmp_ext)\n\n          self.behavior = :revoke if options[:destroy]\n\n          empty_directory destination_root(@admin_path)\n\n          # Setup Admin Model\n          @model_name     = options[:admin_model].classify\n          @model_singular = @model_name.underscore","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/padrino/padrino-framework/blob/167044f3d56b2bce12f943eb826fdb0b0ea94375/padrino-admin/lib/padrino-admin/generators/admin_app.rb#L33-L69","documentation":"The same generator guard for the rendering engine: the admin generator only emits haml, slim or erb templates (Actions#supported_ext). tmp_ext comes from the -e/--renderer option or, when omitted, from the project's renderer component choice; if neither is in the list, it prints this notice and raises SystemExit without generating anything.","triggerScenarios":"`padrino g admin -e liquid` (or any engine outside haml/slim/erb); running the generator in a project whose .components renderer is unsupported; a blank renderer component so tmp_ext.to_sym misses the list.","commonSituations":"Apps generated with a template engine the project generator permits but the admin generator does not (liquid, erubis, etc.); passing a wrong -e value; hand-edited .components with an empty renderer line.","solutions":["Pass an explicitly supported renderer: `padrino g admin -e erb` (or haml/slim)","Or change the project's renderer component in .components to haml/slim/erb and re-run without -e","Verify .components has a valid renderer: line before generating"],"exampleFix":"# before\nbundle exec padrino g admin -e liquid\n\n# after\nbundle exec padrino g admin -e erb","handlingStrategy":"validation","validationCode":"renderer = (options[:renderer] || File.read('.components')[/^renderer:\\s*(.+)/, 1]).to_s.strip.to_sym\nabort \"admin supports haml/slim/erb, got #{renderer}\" unless %i[haml slim erb].include?(renderer)","typeGuard":"def admin_supported_renderer?(ext) = %i[haml slim erb].include?(ext.to_sym)","tryCatchPattern":"begin\n  Padrino::Generators::AdminApp.start(['-e', 'erb'])\nrescue SystemExit\n  # unsupported renderer — pass -e haml/slim/erb explicitly\nend","preventionTips":["Always pass -e haml|slim|erb to `padrino g admin` when the project uses a less common engine","Validate the renderer line in .components before scripting generator calls","Prefer scripting generators with explicit flags over relying on ambient component choices"],"tags":["padrino-admin","generator","renderer","template-engine","cli"],"backgroundTag":"unsupported-template-engine","analyzedSha":"167044f3d56b2bce12f943eb826fdb0b0ea94375","analyzedAt":"2026-08-23T12:41:41.049Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}