Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Setting environment variables in RubyMine on a Mac

David Goudreau
Tuesday, July 28, 2009

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:

vi ~/.MacOSX/environment.plist

and then…

<?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.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

One comment

  1. Erik Hanson says:

    It seems that you have to make sure this file is in XML format. If you create a new plist file with the Property List Editor, make sure you do a “Save As” and choose “XML” as the file type.

    July 29, 2009 at 9:31 pm

Add New Comment Cancel reply

Your email address will not be published.

David Goudreau

David Goudreau
San Francisco

Recent Posts

  • Standup 4/1/2011: April Fool's edition
  • Standup 3/31/2011: Process.spawn pwns all yer codez!
  • Standup 3/29/2011: Git it!
Subscribe to David's Feed

Author Topics

agile (14)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >