The problem (I believe) is that calling "/usr/bin/env cake run" at the top of all of your scripts forces the use of the system Ruby (since the system Ruby is the one that env "knows" about). The Ruby that RVM manages is definitely ahead of the system Ruby in my PATH, but that doesn't help the 'env' call.In my local workspace, I changed all the calls to "#!/usr/bin/env cake run" to instead be: "#!/Users/mario/.rvm/gems/ruby-1.8.7-p302/bin/cake run", but this didn't solve my problem:/Users/mario/Library/Application Support/TextMate/Bundles/ClojureCake.tmbundle/Support/bin/load_file.clj: line 4: require: command not found /Users/mario/Library/Application Support/TextMate/Bundles/ClojureCake.tmbundle/Support/bin/load_file.clj: line 5: syntax error near unexpected token `(' /Users/mario/Library/Application Support/TextMate/Bundles/ClojureCake.tmbundle/Support/bin/load_file.clj: line 5: `(let [tm-filepath (cake/*env* "TM_FILEPATH")]'I also had to change "Cake Start.tmCommand" so that instead of just calling "cake" it called the explicit path to cake (inside of the rvm directory where the gem is installed). This change got the cake JVM up and running (it didn't work before because "cake" wasn't on the system path, which is what gets called when you just try to invoke 'cake' in that JavaScript evaluation string). But even with the cake JVM running, the explicit cake reference in the shebang line of all the clj files doesn't get this bundle's commands to work.I am open to suggestions. I have my own Clojure bundle (http://github.com/marioaquino/Clojure-tmbundle) that I would like to merge with this bundle if I can get the cake integration working.Thanks,--Mario
Thanks for the suggestion. Didn't work, unfortunately. I am at a loss to explain what may be going wrong.It seems that I won't be able to use your plugin. That's a pity because it would really help me.If you ever get around to using RVM to manage your Ruby installations, please try working it out yourself.--Mario
'/usr/bin/env cake' works for me from the command line (IOW, I get a list of all the things that cake accepts as command line params). Just typing 'cake' by itself also works.
I went through several iterations this AM to get textmate + clojure +
rvm working and had some success.
John Paul's instructions helped, they definitely got me farther than I had been getting before. I still get an error, though:clojure.lang.Compiler$CompilerException: java.io.FileNotFoundException: Could not locate clojure/contrib/seq_utils__init.class or clojure/contrib/seq_utils.clj on classpath: (utils.clj:1) at clojure.lang.Compiler.eval (Compiler.java:5435) clojure.lang.Compiler.eval (Compiler.java:5410) clojure.lang.Compiler.load (Compiler.java:5852) clojure.lang.Compiler.loadFile (Compiler.java:5815) clojure.lang.RT$3.invoke (RT.java:296) clojure.core$eval728.invoke (eval_last_sexpr.clj:3) clojure.lang.Compiler.eval (Compiler.java:5419) clojure.lang.Compiler.load (Compiler.java:5852) clojure.lang.Compiler.loadFile (Compiler.java:5815) clojure.lang.RT$3.invoke (RT.java:296) cake.server$run_file.invoke (server.clj:93) cake.server$create$fn__631$fn__638.invoke (server.clj:136) cake.server$create$fn__631.invoke (server.clj:119) cake.utils.server_socket$accept_fn$fn__297$fn__300.invoke (server_socket.clj:39) cake.utils.server_socket$accept_fn$fn__297.invoke (server_socket.clj:38) clojure.lang.AFn.run (AFn.java:24) java.lang.Thread.run (Thread.java:637) Caused by: java.io.FileNotFoundException: Could not locate clojure/contrib/seq_utils__init.class or clojure/contrib/seq_utils.clj on classpath: at clojure.lang.RT.load (RT.java:412) clojure.lang.RT.load (RT.java:381) clojure.core$load$fn__4509.invoke (core.clj:4905) clojure.core$load.doInvoke (core.clj:4904) clojure.lang.RestFn.invoke (RestFn.java:409) clojure.core$load_one.invoke (core.clj:4729) clojure.core$load_lib.doInvoke (core.clj:4766) clojure.lang.RestFn.applyTo (RestFn.java:143) clojure.core$apply.invoke (core.clj:542) clojure.core$load_libs.doInvoke (core.clj:4800) clojure.lang.RestFn.applyTo (RestFn.java:138) clojure.core$apply.invoke (core.clj:542) clojure.core$require.doInvoke (core.clj:4869) clojure.lang.RestFn.invoke (RestFn.java:483) textmate$eval732$loading__4408__auto____733.invoke (utils.clj:1) textmate$eval732.invoke (utils.clj:1) clojure.lang.Compiler.eval (Compiler.java:5419) clojure.lang.Compiler.eval (Compiler.java:5410) clojure.lang.Compiler.load (Compiler.java:5852) clojure.lang.Compiler.loadFile (Compiler.java:5815) clojure.lang.RT$3.invoke (RT.java:296) clojure.core$eval728.invoke (eval_last_sexpr.clj:3) clojure.lang.Compiler.eval (Compiler.java:5419) clojure.lang.Compiler.load (Compiler.java:5852) clojure.lang.Compiler.loadFile (Compiler.java:5815) clojure.lang.RT$3.invoke (RT.java:296) cake.server$run_file.invoke (server.clj:93) cake.server$create$fn__631$fn__638.invoke (server.clj:136) cake.server$create$fn__631.invoke (server.clj:119) cake.utils.server_socket$accept_fn$fn__297$fn__300.invoke (server_socket.clj:39) cake.utils.server_socket$accept_fn$fn__297.invoke (server_socket.clj:38) clojure.lang.AFn.run (AFn.java:24) java.lang.Thread.run (Thread.java:637)I also have clojure (and clojure-contrib) installed via homebrew. The error message above looks to me like the bundle code (utils.clj) is blowing up because it can't find a file from clojure-contrib on the classpath. Any idea how to resolve this?--Mario
Following those 6 exact instructions causes the error message I previously posted about clojure not being able to find clojure/contrib/seq_utils__init.class or clojure/contrib/seq_utils.clj on the classpath. So I have tried a few things to resolve it.1) I have a "clj" script that homebrew setup for me. This script only includes the main clojure.jar file when it tries to run clojure.main. I edited this script to also include clojure-contrib on the classpath. This had no effect (IOW, I get the same error message about seq_utils.clj not being found on the classpath). I only just now saw your note about cake using its own version of clojure and clojure-contrib so my changing the clj script and that not having any effect makes sense. Do you know if it is possible to tell cake to use a different version of clojure (and clojure-contrib)?2) I also created a CLASSPATH environment variable (in TextMate's preferences dialog) that included both clojure.jar and clojure-contrib.jar files (both from the homebrew clojure installation path). This likewise had no effect.Given the other folks were able to get this working without having to tinker with cake or cake which version of clojure (and clojure-contrib) to use, I am at a loss about why this isn't working for me. I have tried using the cake gem both from Ruby 1.8.7 and 1.9.2 (via rvm).It feels like I am closer that I was before, but I don't know how to add clojure-contrib to the classpath that cake needs when it tries to run the bundle scripts.
Following those 6 exact instructions causes the error message I previously posted about clojure not being able to find clojure/contrib/seq_utils__init.class or clojure/contrib/seq_utils.clj on the classpath. So I have tried a few things to resolve it.1) I have a "clj" script that homebrew setup for me. This script only includes the main clojure.jar file when it tries to run clojure.main. I edited this script to also include clojure-contrib on the classpath. This had no effect (IOW, I get the same error message about seq_utils.clj not being found on the classpath). I only just now saw your note about cake using its own version of clojure and clojure-contrib so my changing the clj script and that not having any effect makes sense. Do you know if it is possible to tell cake to use a different version of clojure (and clojure-contrib)?2) I also created a CLASSPATH environment variable (in TextMate's preferences dialog) that included both clojure.jar and clojure-contrib.jar files (both from the homebrew clojure installation path). This likewise had no effect.Given the other folks were able to get this working without having to tinker with cake or cake which version of clojure (and clojure-contrib) to use, I am at a loss about why this isn't working for me. I have tried using the cake gem both from Ruby 1.8.7 and 1.9.2 (via rvm).It feels like I am closer that I was before, but I don't know how to add clojure-contrib to the classpath that cake needs when it tries to run the bundle scripts.--Mario