How do i get IntelliJ to pick up my environment variables on MacOS X?

Viewed 14478

I have tried to set these using RCenvironment, .bashrc, .MacOSX/environment.plist and /etc/launchd.conf and restarted computer....IntelliJ is still not picking up my env variables:

Gemfile p "ENVIRONMENT: #{ENV['VAR_PRIVATE_GEM_USERNAME']}" # Outputs "ENVIRONMENT: "

2 Answers

You can set an environment variable on a Mac that will be available in all apps (not just the command line) by using "launchctl" (see https://ss64.com/osx/launchctl.html)

launchctl setenv VARIABLE_NAME VALUE
Related