Loading twitter status...
/ 28.Aug.2007
I liked the cool looking RSpec results that I kept seeing in the peepcode RSpec screencasts so I set out to try and get them to work for me. It wasn’t long before I ran into a hurdle.. I started getting an error about a file not being found. It was a file called spec_mate.rb that was located in /Users/username/Library/Application\ Support/TextMate/Pristine\ Copy/Bundles/RSpec.tmbundle/Support/lib/. I’m still new to MacOSX so I wasn’t sure what could be going on and quite a few google searches for the exact error message I was getting and variations of the sort weren’t helping very much at all. I then found out that when you load an application (like TextMate) from the MacOSX GUI, the PATH variable isn’t set like it is if you load something from a terminal window. So here’s the quick and easy way that I got my TextMate and RSpec to work nice together. I’d assume this method will continue to work for various applications that require the PATH variable.
Load up your terminal.. We need to create the path where the environment will reside.
mkdir ~/.MacOSX
Now we need to create the environment file. Since this all started with TextMate for me, I’m going to use that, but you can use whatever text editor you like that also lets you save files in a hidden directory.
mate ~/.MacOSX/environment.plist
Now we just need to fill it with the PATH. This method will work with any type of environment variable. If you require something different from the PATH, just replace whatever you need in the key tag and whatever value you require in the string tag. Just copy this into your new environment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin</string>
</dict>
</plist>
That’s all there is to it! You’ll need to log out and log back in (no need to reboot, just log out) for the changes to take place because these settings are only read when you log in. Now you should be able to load up TextMate from the GUI without worrying about your PATH variable. Hope this helps someone out!
micro theme by seaofclouds, edited by me, and powered with Mephisto
3 Comments
THANKS, just what I needed. I have also found lot of other people with the same problems on google, but no solution. Actually I found your site by searching after restful and belons_to relations.
I searched for weeks, posted to the RSPEC list and could not solve this problem at all. Thanks so much for fixing this annoying problem!
Thanks, you just saved me a ton of time.
Leave a Comment
Thanks for the comment!