RubyMine run configuration environment variables and SDK path not applied in production deployment
0 reputation · 06 Apr 2021, 03:11 UTC
0 reputation · 06 Apr 2021, 03:11 UTC
I have a Ruby application that runs correctly when launched through a RubyMine Run/Debug Configuration, but fails when started by the production deployment script. The configuration defines a custom working directory, several environment variables, and points at an rbenv-managed Ruby SDK selected in the project settings.
My understanding is that the working directory, environment variables, and even the interpreter choice stored in the run configuration are IDE-side concerns: they shape how RubyMine spawns the process locally, but nothing in the deployed artifact carries them over. The production host uses a different Ruby version via its own rbenv setup and starts the app from a systemd unit with no explicit environment file.
I am also unsure how much of the SDK resolution (gem paths, gemset selection) is baked in at edit time versus resolved at launch, and whether the shell profile scripts that set up rbenv in an interactive terminal are even read when the IDE or an init system spawns the process.
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.