Here’s a fun one – how do you get RubyMine to access environment variables when you’ve got dependencies on those awful little things in your code and can’t get around it? Well, assuming you’re using a Mac (you are using a Mac, aren’t you?), here’s the magic incantation to get it to work:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>M2_REPO</key> <string>/Users/david/.m2/repository</string> <key>MAVEN_OPTS</key> <string>-XX:MaxPermSize=128m -Xmx512m</string> </dict> </plist>
Then reboot your machine. Voila! Your environment variables should now be available for RubyMine (this works for IntelliJ Idea as well). Here’s some additional information about environment.plist files, too.
About the Author