Setting environment variables in RubyMine on a Mac

July 28, 2009 David Goudreau

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" "">
<plist version="1.0">
    <string>-XX:MaxPermSize=128m -Xmx512m</string>

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


How do you use named_scopes?
How do you use named_scopes?

You may have heard of some problems we've had with changes to named_scope in Rails 2.3. The basic change i...

Take a Looksee at how a Ruby Object got its Methods
Take a Looksee at how a Ruby Object got its Methods

One property of the Ruby object model and object oriented programming in general is that a subclass of an o...

SpringOne 2022

Register Now