Skip to content
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

Lazily load the debug gem #292

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Lazily load the debug gem #292

merged 2 commits into from
Jan 4, 2024

Conversation

elia
Copy link
Contributor

@elia elia commented Nov 16, 2023

Fixes #291

Lazily load the debug gem in order to mitigate issues with docker environments such as dip.

Backport the port configuration so it allows overriding.

@hachi8833
Copy link

Looks simple and nice!

@elia elia marked this pull request as ready for review November 17, 2023 10:08
With this configuration `bin/dev` will use port 3000,
but `bin/dev -p 3001` will correctly start the server on port 3001.
Some docker environments will trigger an error related to unix sockets
and permissions on temporary folders. Loading the debugger lazily
mitigates the issue so at least rails can be started without crashing,
while keeping the remote debugging available for other environments
that support it.
@flavorjones
Copy link
Member

Apologies for my slow response. This looks great! Thank you!

@flavorjones flavorjones merged commit 73ace31 into rails:main Jan 4, 2024
22 checks passed
@elia elia deleted the debug-lazy branch January 16, 2024 21:06
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.

RUBY_DEBUG_OPEN=true in Procfile.dev breaks running Rails app within Docker container
3 participants