Skip to content

Commit

Permalink
Play past OpenStruct loading issue with global 'require'
Browse files Browse the repository at this point in the history
We've been seeing "uninitialize constant" errors for OpenStruct
like

```
uninitialized constant ProjectHelper::OpenStruct
```

which we only see the deployed environments, not in local development
or in CI.

This appears to be a file/class/module loading problem which occurs after
unrelated changes to the codebase.

To play past this issue we now explictly `require "ostruct"` from the
main `application.rb` file.
  • Loading branch information
edavey committed Dec 5, 2024
1 parent 7869128 commit 6b0c879
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require_relative "boot"

require "ostruct"

require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
Expand Down

0 comments on commit 6b0c879

Please sign in to comment.