{"record":{"id":"4d74a4b86244e36f","repo":"padrino/padrino-framework","slug":"engine-engine-inspect-is-not-registered-with-ti","errorCode":null,"errorMessage":"Engine #{engine.inspect} is not registered with Tilt","messagePattern":"Engine #(.+?) is not registered with Tilt","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"padrino-helpers/lib/padrino-helpers/render_helpers.rb","lineNumber":73,"sourceCode":"            else\n              render(explicit_engine, template_path, options, locals)\n            end\n          html.safe_concat content if content\n        end\n      end\n      alias render_partial partial\n\n      def self.included(base)\n        return if base.instance_methods.include?(:render) || base.private_instance_methods.include?(:render)\n\n        base.class_eval do\n          raise \"gem 'tilt' is required\" unless defined?(::Tilt)\n\n          def render(engine, file = nil, options = {}, locals = nil, &block)\n            options.delete(:layout)\n            engine, file = file, engine if file.nil?\n            template_engine = engine ? ::Tilt[engine] : ::Tilt.default_mapping[file]\n            raise \"Engine #{engine.inspect} is not registered with Tilt\" unless template_engine\n            unless File.file?(file.to_s)\n              engine_extensions = ::Tilt.default_mapping.extensions_for(template_engine)\n              file = Dir.glob(\"#{file}.{#{engine_extensions.join(',')}}\").first || raise(\"Template '#{file}' not found\")\n            end\n            template = template_engine.new(file.to_s, options)\n            template.render(options[:scope] || self, locals, &block)\n          end\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":55,"sourceCodeEnd":86,"githubUrl":"https://github.com/padrino/padrino-framework/blob/167044f3d56b2bce12f943eb826fdb0b0ea94375/padrino-helpers/lib/padrino-helpers/render_helpers.rb#L55-L86","documentation":"Padrino's render helper resolves the requested template engine through Tilt: ::Tilt[engine] when an explicit engine symbol is passed, or Tilt's default mapping when only a file path is given. If no template class is registered under that name, this RuntimeError is raised. It means the engine symbol is unknown to Tilt, most often because the template gem that registers it (slim, haml, erubi, tilt-kramdown, and so on) is not installed or not yet loaded.","triggerScenarios":"Calling render :slim, 'page' (or a partial that routes through render) when the slim gem is not in the bundle; passing a misspelled engine symbol such as render :erub; using engines that Tilt 2 extracted into separate adapter gems (render :md, render :scss, render :liquid) without those gems installed; rendering before the template library has been required.","commonSituations":"Upgrading Tilt 1.x to 2.x, where most template engines moved out of Tilt core into standalone gems; a template gem placed only in the :development Bundler group so it works locally but raises in production; typos in engine symbols; porting Sinatra or Rails examples that assume every engine ships with the framework.","solutions":["Add the template gem that registers the engine with Tilt to your Gemfile (for example gem 'slim', gem 'haml', gem 'tilt-kramdown') in the default group and run bundle install","Verify registration in a console with ::Tilt[:slim] — nil means the gem is still not loaded, a Class means it is registered","Fix misspelled engine symbols; the symbol must match a registered Tilt engine name exactly (erb, erubi, haml, slim, and so on)","Render by file path including a real extension (for example render 'views/page.slim') so Tilt's default mapping resolves the engine from the extension instead of the symbol"],"exampleFix":"# before\nrender :md, 'README'\n# raises: Engine :md is not registered with Tilt\n\n# after — Gemfile: gem 'tilt-kramdown', then bundle install\nrender :md, 'README'","handlingStrategy":"validation","validationCode":"raise ArgumentError, 'Tilt has no engine ' + engine.inspect unless defined?(::Tilt) && ::Tilt[engine]\nrender(engine, template, options, locals)","typeGuard":"def registered_tilt_engine?(name)\n  defined?(::Tilt) && ::Tilt[name].is_a?(Class)\nend","tryCatchPattern":null,"preventionTips":["Keep template gems in the default Bundler group, not environment-specific groups","Assert ::Tilt[engine] for every engine the app renders during boot","Prefer rendering with real file extensions so Tilt's default mapping resolves the engine"],"tags":["padrino-helpers","tilt","template-engine","rendering","ruby"],"backgroundTag":"template-engine-not-registered","analyzedSha":"167044f3d56b2bce12f943eb826fdb0b0ea94375","analyzedAt":"2026-08-23T12:41:41.049Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}