{"id":4962,"date":"2026-08-30T00:40:33","date_gmt":"2026-08-29T15:40:33","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/resolve-tilt-erubis-error-narou-docker-2\/"},"modified":"2026-08-30T00:40:34","modified_gmt":"2026-08-29T15:40:34","slug":"resolve-tilt-erubis-error-narou-docker","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/server-tech\/virtualization-container-wsl\/resolve-tilt-erubis-error-narou-docker\/","title":{"rendered":"Solution for the tilt\/erubis Error Occurring on narou-docker Startup"},"content":{"rendered":"<p>When using narou-docker, the following error occurred during the Dockerfile build process.<\/p>\n<pre>internal:\/usr\/local\/lib\/ruby\/3.3.0\/rubygems\/core_ext\/kernel_require.rb&gt;:127:in `require': cannot load such file -- tilt\/erubis (LoadError)<\/pre>\n<p>In this article, we explain the cause of this error and the solution posted in GitHub Issue <a href=\"https:\/\/github.com\/whiteleaf7\/narou\/issues\/443\" target=\"_new\" rel=\"noopener\">#443<\/a>.<\/p>\n<h2>Background of the Error<\/h2>\n<p>Inside narou 3.9.1, <a href=\"https:\/\/github.com\/rtomayko\/tilt\" target=\"_new\" rel=\"noopener\">tilt<\/a> is used as the template engine. Traditionally, a module called <code>tilt\/erubis<\/code> existed, but due to modern environments and gem updates, cases where <a href=\"https:\/\/github.com\/jeremyevans\/erubi\" target=\"_new\" rel=\"noopener\">erubi<\/a> is used instead of erubis have been increasing.<\/p>\n<p>This error is caused by the fact that even though narou requires <code>tilt\/erubis<\/code>, the corresponding file no longer exists. Because tilt dropped support for erubis, this issue occurred upon starting narou-docker.<\/p>\n<h2>Solution<\/h2>\n<p>The solution recommended in GitHub Issue <a href=\"https:\/\/github.com\/whiteleaf7\/narou\/issues\/443\" target=\"_new\" rel=\"noopener\">#443<\/a> is as follows.<\/p>\n<ol>\n<li>\n<p><strong>Install erubi<\/strong><br \/>First, install version 1.13 of the erubi gem within the Dockerfile. This makes the latest erubi available.<\/p>\n<\/li>\n<li>\n<p><strong>Replace the Reference in the Code<\/strong><br \/>In narou&#8217;s internal code (<code>\/usr\/local\/bundle\/gems\/narou-3.9.1\/lib\/web\/appserver.rb<\/code>), replace the reference to <code>tilt\/erubis<\/code> with <code>tilt\/erubi<\/code>. By using the sed command, the replacement process is executed automatically at build time.<\/p>\n<\/li>\n<\/ol>\n<p>A specific example of part of the Dockerfile is shown below.<\/p>\n<div class=\"contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950\">\n<div class=\"flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none\">dockerfile<\/div>\n<div>\n<pre># Dockerfile \u306e\u4e00\u90e8\u4f8b\n&amp;&amp; gem install narou -v ${NAROU_VERSION} --no-document \\\n&amp;&amp; RUN gem install erubi -v 1.13 --no-document \\\n&amp;&amp; sed -ie \"s\/tilt\\\/erubis\/tilt\\\/erubi\/g\" \/usr\/local\/bundle\/gems\/narou-3.9.1\/lib\/web\/appserver.rb<\/pre>\n<\/div>\n<\/div>\n<p>We have confirmed that this configuration correctly replaces the template engine module referenced by narou and resolves the error.<\/p>\n<h2>Explanation and Discussion<\/h2>\n<ul>\n<li>\n<p><strong>Why erubi?<\/strong><br \/>erubi is being developed as the successor to erubis, offering improvements in performance and security. By modifying narou&#8217;s code, we can maintain compatibility suited for modern environments.<\/p>\n<\/li>\n<li>\n<p><strong>Using the sed Command<\/strong><br \/>The key point is using the sed command inside the Dockerfile to automatically patch narou&#8217;s source code during the build. This eliminates the hassle of manual fixes or applying patches.<\/p>\n<\/li>\n<li>\n<p><strong>Future Outlook<\/strong><br \/>Since this matter has also been discussed in GitHub Issue <a href=\"https:\/\/github.com\/whiteleaf7\/narou\/issues\/443\" target=\"_new\" rel=\"noopener\">#443<\/a> and the fix has been merged into the develop branch, it is expected to be officially supported in future updates. It is recommended to check for project update information regularly.<\/p>\n<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>The <code>tilt\/erubis<\/code> error that occurs during the Dockerfile build of narou-docker was caused by a compatibility issue with the latest template engine, erubi.<br \/>By following the solution posted in GitHub Issue <a href=\"https:\/\/github.com\/whiteleaf7\/narou\/issues\/443\" target=\"_new\" rel=\"noopener\">#443<\/a> and adding the installation of erubi and the sed replacement process to the Dockerfile, we were able to work around the issue.<\/p>\n<p>We hope this approach helps anyone struggling with the same error to resolve it smoothly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When using narou-docker, the following error occurred during the Dockerfile build process. internal:\/usr\/local [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1064,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=815","footnotes":""},"categories":[1171],"tags":[18,51,430,310],"class_list":["post-4962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-virtualization-container-wsl","tag-docker","tag-git","tag-github","tag-310","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=4962"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4962\/revisions"}],"predecessor-version":[{"id":4965,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4962\/revisions\/4965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/1064"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=4962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=4962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=4962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}