A few weeks ago I won a copy of RubyMine 2.0 from the Phoenix Rails Group Meeting. I had played with it before (RubyMine 1.0 on Leopard) and was sorely disappointed in its performance. I had been wanting to play with the new version especially after the Snow Leopard upgrade.
I spent the Thanksgiving weekend playing and configuring the environment. There was a significant difference this time around, no beach balls. Yup, the performance was much better. Having been bred on IDEs since my days of building COM+ objects in VB, I like having my environment do most of the lifting (heavy or light) for me. Heck, I even had TextMate configured for not only Git but to deploy on command as well. Which brings me to the point of this post, how to use git and run your deploy script from within RubyMine. With Git integrated out of the box I looked for a way to deploy.
So I found this great little post on Not a Ninja that handles it doing the following:

My excitement of a quick and easy solution was overcome by the errors that continued to arise every time I tried to commit, push and deploy. The errors were self explanatory, but confused me. RubyMine was reporting that Git was not installed on my machine. So I jumped to the shell and it worked, then flipped over to TextMate and it also worked so what was the problem? I went into the RubyMine preferences and checked out the configuration on Git and the executable was listed as just 'git'. Trying several options here all with no luck, I began the Google shuffle.
What I discovered was that because .bash and .bash_profile only work with the Terminal App, that RubyMine has no visibility on the PATH variable I have set in there. OK, so that explains why RubyMine has no idea where Git is installed, but how do I get around it? Apple recommends using the environment.plist so I head down that road (the path pun was to easy). After a few tries and some reboots, I still have no success. So now what is going on?
After some searching, I discover that if you use Spotlight to launch your app the environment doesn't get loaded. Seriously? More searching and I find another solution.
Pivotal Labs had the answer (and apparently wasted as much time looking for the answer as I did). You have to set your environment variables in /etc/launchd.conf. To do this open your terminal and enter the following:
- which git
- No copy your results
- sudo nano /etc/launchd.conf
- setenv PATH /usr/local/git/bin/git (or whatever you which git result in)
- Save and Reboot
That should take care of it. I am sure Apple has their reasons for handling the variables in 3 different locations, but it can be pain and frustration. I hope this eliminates any troubles you have getting RubyMine up and running.
I have now been running RubyMine for the last 2 weeks and have not gone back to TextMate once while working on my projects. There are so many things that are made easier and little subtle touches that make it great. I do wish the performance was a little better, but I am sure they are working on it. I also want to add that I was doing this on Thanksgiving and had emailed their customer support. I actually had a response from them in 4 hours. That is awesome and worth the price admission alone.
Recent Comments