Skip to content

Conversation

@pezholio
Copy link
Contributor

@pezholio pezholio commented Nov 3, 2025

This removes the requirement for :environment to be loaded for some tasks that do not use the Rails environment. We initially suspected this to be the cause of our deployment woes, but this was a bit of a red herring. However, I think it's still worth doing because it will mean the tasks come up a bit quicker.

We suspect this is causing the Rake task to be eager loaded on
boot, and as the Rake task requires a script that requires dev/test
gems, this is causing the app to choke on boot.

I’ve also had to add an ignore rule for this file, as Rubocop’s
Rails rules require `:environment` to be included.
These do not need the Rails environment either, and will mean
they run faster too.
@pezholio pezholio force-pushed the remove-environment-from-rake-task branch from b1ef3c3 to 5ae80b4 Compare November 3, 2025 11:54
@pezholio
Copy link
Contributor Author

pezholio commented Nov 3, 2025

I've added an issue to Rubocop to point out that this might be an issue for some folks rubocop/rubocop-rails#1550

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants