# Trouble with Zeitwerk reloading

**URL:** https://meta.discourse.org/t/trouble-with-zeitwerk-reloading/287013
**Category:** Development
**Created:** [November 29, 2023, 10:04pm UTC](https://meta.discourse.org/t/trouble-with-zeitwerk-reloading/287013 "2023-11-29T22:04:05Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [November 29, 2023, 10:14pm UTC](https://meta.discourse.org/t/trouble-with-zeitwerk-reloading/287013/2 "2023-11-29T22:14:32Z")

</div>

Have you seen this topic? If you follow the structure there (and in the plugin-skeleton), things should work pretty smoothly:

> [@Structuring a plugin for Rails autoloading](https://meta.discourse.org/t/structuring-a-plugin-for-rails-autoloading/256092):
>
> Many plugins include lots of class definitions inside plugin.rb, or use require\_relative to load ruby files. That works, but it comes with some disadvantages: No auto-reloading of changes in development. Any changes require a full server restart Getting the require calls in the right order can be painful If they are require’d outside the after\_initialize block, then other autoloaded classes/modules may not be available There is a solution! Plugins can lean on the standard Rails autoloading sy…

An important part of Zeitwerk autoloading is the file names/paths, so it’s hard to identify the problem from the snippet you shared. Is that in a `plugin.rb` file? Or some other file?

---

_[View the full topic](https://meta.discourse.org/t/trouble-with-zeitwerk-reloading/287013)._
