Git Product home page Git Product logo

Comments (1)

CamJN avatar CamJN commented on July 21, 2024

I'm not 100% sure that I agree that this is wrong behaviour in general, though it is certainly unexpected in this case.

When you start passenger with passenger start you are doing so in the dir with the rbenv-vars file, presumably using rbenv in your shell to run the correct ruby, so rbenv will load the initial env var into your shell env. Then when you start passenger it inherits the env vars from your shell, it then starts your app, using a child shell which loads rbenv and rbenv-vars which overrides the inherited env var from the parent shell. When you change the value of the env var in the file the changed value is what overrides the inherited env var so that still works as expected, however when you delete the env var from the rbenv-vars file, and restart the app, loading the env vars from rbenv-vars by the child shell doesn't clobber the inherited env var and thus you get the value from when the parent shell read the file and then started passenger.

This is certainly unexpected when you want the env to be managed by the rbenv-vars file but being able to inherit env vars from the parent process is also an expected capability for passenger. I'd recommend using the env utility to be sure passenger starts with only the env vars that are necessary to start the child shell which loads your app.

from passenger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.