{"id":4787,"date":"2022-02-09T12:00:42","date_gmt":"2022-02-09T03:00:42","guid":{"rendered":"https:\/\/suzutukiblog.com\/?p=4787"},"modified":"2022-08-31T04:38:29","modified_gmt":"2022-08-30T19:38:29","slug":"zeitwerknameerror","status":"publish","type":"post","link":"https:\/\/suzutukiblog.com\/index.php\/2022\/02\/09\/zeitwerknameerror\/","title":{"rendered":"(Zeitwerk::NameError)\u30a8\u30e9\u30fc\u5bfe\u51e6\u9332Ruby+Heroku"},"content":{"rendered":"<h2>Heroku\u3067\u3046\u307e\u304f\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067<\/h2>\n<pre><strong>heroku run console <\/strong><\/pre>\n<p>\u3067\u8abf\u3079\u305f\u3068\u3053\u308d\u6b21\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f\u3002<\/p>\n<h2><strong>\/app\/vendor\/bundle\/ruby\/3.0.0\/gems\/zeitwerk-2.5.4\/lib\/zeitwerk\/loader\/callbacks.rb:25:in `on_file_autoloaded&#8217;: expected file \/app\/app\/serializers\/\u3007\u3007_serializer.rb to define constant \u3007\u3007Serializer, but didn&#8217;t (Zeitwerk::NameError)<\/strong><\/h2>\n<h3>\u89e3\u6c7a\u6cd5<\/h3>\n<pre><code>config.autoloader = :classic<\/code><\/pre>\n<p><strong>config\/application.rb\u306b\u8ffd\u52a0\u3059\u308b<\/strong><\/p>\n<div>\n<pre>\u301c\u301c\r\n\u301c\u301c\r\n\r\n#module\u304b\u3089\u4e0a\u306f\u7701\u7565\r\nmodule Api\r\n  classApplication &lt; Rails::Application\r\n\r\n# Initialize configuration defaults for originally generated Rails version.\r\n    config.load_defaults6.1\r\n# Configuration for the application, engines, and railties goes here.\r\n# These settings can be overridden in specific environments using the files\r\n# in config\/environments, which are processed later.\r\n# config.time_zone = \"Central Time (US &amp; Canada)\"\r\n# config.eager_load_paths &lt;&lt; Rails.root.join(\"extras\")\r\n#  \u3053\u308c\u3092\u8ffd\u52a0\u2193\r\n     config.autoloader = :classic\r\n# Only loads a smaller set of middleware suitable for API only apps.\r\n# Middleware like session, flash, cookies can be added back manually.\r\n# Skip views, helpers and assets when generating a new resource.\r\n     config.api_only = true\r\n  end\r\nend<\/pre>\n<\/div>\n<p>\u8ffd\u52a0\u3057\u3066\u4fdd\u5b58\u5f8c\u306b<\/p>\n<pre><code>bundle exec pumactl start<\/code><\/pre>\n<p>\u2191\u3092\u30b3\u30de\u30f3\u30c9\u3057\u305f\u3068\u3053\u308dpuma\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Heroku\u3067\u3046\u307e\u304f\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067 heroku run console \u3067\u8abf\u3079\u305f\u3068\u3053\u308d\u6b21\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f\u3002 \/app\/vendor\/bundle\/ruby\/3.0.0\/gems\/zeitwerk- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[27,26],"tags":[],"class_list":["post-4787","post","type-post","status-publish","format-standard","hentry","category-programming-note","category-trouble-shooting"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/4787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=4787"}],"version-history":[{"count":4,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/4787\/revisions"}],"predecessor-version":[{"id":5595,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/4787\/revisions\/5595"}],"wp:attachment":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=4787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=4787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=4787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}