Skip to content

Block reload config files in Railtie if they already uploaded #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vovanmozg
Copy link

@vovanmozg vovanmozg commented Mar 6, 2024

Fixes #352

@vovanmozg vovanmozg force-pushed the block-reload-config branch from d25a628 to 5db7fc4 Compare March 30, 2024 23:53
@vovanmozg
Copy link
Author

@cjlarose, could you check tests?

@pkuczynski
Copy link
Member

@vovanmozg are you still interested in moving forward with this PR?

@pkuczynski pkuczynski requested a review from Nuzair46 July 15, 2025 11:30
@pkuczynski
Copy link
Member

@Nuzair46 what do you think about this one?


```ruby
Config.setup do |config|
config.load_and_set_settings("/path/to/yaml1", "/path/to/yaml2", ...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this comment suggests in the original issue #352 (comment)
I think its better to be

Config.setup { ... }
Config.load_and_set_settings("...")

Because it feels more right.

@Nuzair46
Copy link
Member

Nuzair46 commented Jul 15, 2025

@pkuczynski @vovanmozg the failing tests seems to be an issue with Rails 6.1 not loading logger properly.
I was able to fix it by doing this
This can be identified by rescue in the runner code. And I saw logger error.
Before:

`#{Rails.root.join("bin", "rails")} runner 'print "\#{Settings.default}|\#{Settings.custom}"'`

After:

`RUBYOPT="-r logger" #{Rails.root.join("bin", "rails")} runner 'print "\#{Settings.default}|\#{Settings.custom}"'`

This makes ruby to load the logger before anything runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Rails integration does not allow multiple YAML files to be specified in the first load
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy