{"action":"created","issue":{"url":"https://api.github.com/repos/middleman/middleman/issues/1541","labels_url":"https://api.github.com/repos/middleman/middleman/issues/1541/labels{/name}","comments_url":"https://api.github.com/repos/middleman/middleman/issues/1541/comments","events_url":"https://api.github.com/repos/middleman/middleman/issues/1541/events","html_url":"https://github.com/middleman/middleman/issues/1541","id":88191731,"number":1541,"title":"TypeError in rendering.rb when using wrap_layout","user":{"login":"nickrttn","id":2504906,"avatar_url":"https://avatars.githubusercontent.com/u/2504906?v=3","gravatar_id":"","url":"https://api.github.com/users/nickrttn","html_url":"https://github.com/nickrttn","followers_url":"https://api.github.com/users/nickrttn/followers","following_url":"https://api.github.com/users/nickrttn/following{/other_user}","gists_url":"https://api.github.com/users/nickrttn/gists{/gist_id}","starred_url":"https://api.github.com/users/nickrttn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickrttn/subscriptions","organizations_url":"https://api.github.com/users/nickrttn/orgs","repos_url":"https://api.github.com/users/nickrttn/repos","events_url":"https://api.github.com/users/nickrttn/events{/privacy}","received_events_url":"https://api.github.com/users/nickrttn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-14T14:24:14Z","updated_at":"2015-06-15T16:57:10Z","closed_at":null,"body":"I'm getting a TypeError: `no implicit conversion of false into String` when I try to use wrap_layout in my template.\r\n\r\nI've got the Middleman site I'm working on in a repo at [github.com/nickrttn/portfolio-template](https://github.com/nickrttn/portfolio-template).\r\n\r\nThis is the last item of the traceback I'm getting:\r\n\r\n``` ruby\r\n/Users/nickrttn/.rvm/gems/ruby-2.2.2/gems/middleman-core-3.3.12/lib/middleman-core/core_extensions/rendering.rb: in extname\r\n        # @return [void]\r\n        def wrap_layout(layout_name, &block)\r\n          # Save current buffer for later\r\n          @_out_buf, _buf_was = '', @_out_buf\r\n\r\n          layout_path = locate_layout(layout_name, current_engine)\r\n\r\n          extension = File.extname(layout_path)...\r\n          engine = extension[1..-1].to_sym\r\n\r\n          # Store last engine for later (could be inside nested renders)\r\n          self.current_engine, engine_was = engine, current_engine\r\n\r\n          begin\r\n            content = if block_given?\r\n```\r\n\r\nThis is the layout file I'm trying to use:\r\n\r\n``` haml\r\n= wrap_layout :layout do\r\n  %h2 current_page.title\r\n  %article= yield\r\n```\r\n\r\nAnd here's the relevant bits of config.rb\r\n\r\n``` ruby\r\n# Enable and configure portfolio items\r\nactivate :blog do |blog|\r\n  # Blog options\r\n  blog.sources = \"portfolio/{category}/{title}.html\"\r\n  blog.permalink = \"portfolio/{category}/{title}.html\"\r\nend\r\n\r\nactivate :views\r\nactivate :directory_indexes\r\nactivate :protect_emails\r\nactivate :syntax\r\n\r\nset :relative_links, true\r\nset :css_dir, 'assets/stylesheets'\r\nset :js_dir, 'assets/javascripts'\r\nset :images_dir, 'assets/images'\r\nset :fonts_dir, 'assets/fonts'\r\nset :layout, 'layouts/application'\r\nset :partials_dir, 'layouts/partials'\r\n\r\npage \"portfolio/*.html\", :layout => :article_layout\r\n```"},"comment":{"url":"https://api.github.com/repos/middleman/middleman/issues/comments/112136322","html_url":"https://github.com/middleman/middleman/issues/1541#issuecomment-112136322","issue_url":"https://api.github.com/repos/middleman/middleman/issues/1541","id":112136322,"user":{"login":"tdreyno","id":233,"avatar_url":"https://avatars.githubusercontent.com/u/233?v=3","gravatar_id":"","url":"https://api.github.com/users/tdreyno","html_url":"https://github.com/tdreyno","followers_url":"https://api.github.com/users/tdreyno/followers","following_url":"https://api.github.com/users/tdreyno/following{/other_user}","gists_url":"https://api.github.com/users/tdreyno/gists{/gist_id}","starred_url":"https://api.github.com/users/tdreyno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdreyno/subscriptions","organizations_url":"https://api.github.com/users/tdreyno/orgs","repos_url":"https://api.github.com/users/tdreyno/repos","events_url":"https://api.github.com/users/tdreyno/events{/privacy}","received_events_url":"https://api.github.com/users/tdreyno/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T16:57:10Z","updated_at":"2015-06-15T16:57:10Z","body":"You are requesting a layout called \"layout\", but you do not have a file for this. Did you mean `:application`?"}}