The only constant is change.
Clojure
Fixing textmate-clojure “env: cake: No such file or directory” error
May 22nd
Posted by Kevin Matheny in Clojure
I spent some time tonight fixing a fatal error with textmate-clojure, and since the solution turned out to be really easy, I thought I’d share it.
I’m running OS X 10.6.7, with an install of Textmate 1.5.10. I installed the textmate-clojure bundle, which looks very nice. I already had Clojure 1.2 installed, as well as Ruby 1.8.7 and Cake 0.6.3 (I also have Leiningen installed, but I am moving to Cake because it’s really slick).
Initial steps of the install went well, but while I could (seemingly) start a REPL from Textmate, I couldn’t load a file, instead getting the env: cake: No such file or directory error.
I spent a while banging my head on the problem, finding a bunch of information about how to resolve conflicts produced by RVM in this situation, but since I don’t use RVM and didn’t think adding a layer to the problem would be likely to fix it, I kept looking. I eventually ran across a couple of blog posts that gave me the information I needed.
Basically, the issue is that Textmate can’t find Cake, even though it looks like it can.
The short form of the solution:
1. In terminal, type which cake to find out where Cake is installed. For me, it’s /opt/local/bin/cake/
2. In Textmate, open Preferences (CMD-,), select Advanced and then Shell Variables
3. Add your path to the list (remember that it starts with a slash and ends without one, and that elements are separated by : — mine now reads /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin)
Hello, REPL. :)
Commentary