4 ms·
About Environment Variables
- kaffeinecoma 13y agoI've found this process unreliable enough (is it set in the Apache user env, or httpd.conf? Why isn't it getting passed through to Passenger?) that I just put everything into a /usr/local/my-app.yml file, and explicitly load it in application.rb. http://railscasts.com/episodes/85-yaml-configuration-revised http://railscasts.com/episodes/85-yaml-configuration-revised
- bradleyland 13y agoThis is why I've never been a big fan of using environment variables for app configuration. It seems like a clean enough abstraction, but when you start investigating the differences between distributions, applications, and even different packages of the same application, it can get pretty unwieldy. Everyone I raise this argument with replies with something along the lines of, "It's easy if you do it <this way>!" Where <this way> is some prescribed method that works in their environment. Change one aspect of their stack, and that method no longer works. It's a failure of portability that drives me crazy. I don't like marrying myself to a specific platform to that degree.
- adlpz 13y agoThe PATH environment [...] is a *comma-separated* list It's a colon-separated list. Apart from that, nice overview of Env vars.
- FooBarWidget 13y agoDoh, typo. Fixing that. :)
- tantalor 13y agoDon't forget you can specify environment variables when you start a new process from bash, > APXS2=/usr/sbin/apxs2 ruby -e 'p ENV["APXS2"]' "/usr/sbin/apxs2"