REALLY setting environment variables in RubyMine on a Mac

August 7, 2009 David Goudreau

In my previous article I talked about using environment.plist to set environment variables in RubyMine. Well, it turns out that environment.plist doesn’t always work. Specifically, if you start RubyMine from Spotlight RubyMine has a different parent process that DOESN’T take into account the environment.plist file. It DOES work if you open RubyMine using the Dock or Quicksilver, though. Who would have guessed? This easily killed a day or so of troubleshooting on my current project.
So, to really solve this problem, it turns out you have to put your environment variables in /etc/launchd.conf like this:

setenv M2_HOME /opt/maven/2.0.9

For more details, check out this blog post and this blog post.

About the Author


How to Not Test RabbitMQ Part 2
How to Not Test RabbitMQ Part 2

This is Part 2 of my two part series on working with queues in Ruby. If you want some context please head o...

How To Not Test RabbitMQ Part 1
How To Not Test RabbitMQ Part 1

Q: How do you catch a unique rabbit? A: Unique (you-neek) up on it! Q: How do you catch a tame rabbit? A: T...

SpringOne 2021

Register Now