How reload system ENV in RubyMine?

292 Views Asked by At

I try to set ENV variable in ~/.bash_profile, for example export foo='42'.
If RubyMine was running, I can't read this foo variable as ENV['foo']. If I restart RubyMine, I can read foo from system ENV.
How can I say RubyMine, that it must to reload system ENV?

1

There are 1 best solutions below

1
On BEST ANSWER

You can't. Environment variables are inherited by newly started subprocesses. After the subprocess has started, it has its own independent set of environment variables.