Hey Glenn,

I feel your pain. Here's how I've set things up on my Mac:

Created ~/.clojure

Inside there I have this:

$ ls -l
total 72
drwxr-xr-x   8 gslepak  gslepak    272 Jun 26 19:12 clj.git/
-rwxr-xr-x@  1 gslepak  gslepak   2201 Jun 30 02:05 clj.lsp*
drwxr-xr-x  11 gslepak  gslepak    374 Jun 26 17:26 clojure-1.1/
drwxr-xr-x  16 gslepak  gslepak    544 Jun 26 17:23 clojure-contrib-1.1/
drwxr-xr-x   6 gslepak  gslepak    204 Jun 26 17:18 clojure-contrib-dev/
lrwxr-xr-x   1 gslepak  gslepak     39 Jun 27 22:51 clojure-contrib.jar@ -> 
clojure-contrib-dev/clojure-contrib.jar
drwxr-xr-x  18 gslepak  gslepak    612 Jun 28 22:38 clojure.git/
lrwxr-xr-x   1 gslepak  gslepak     23 Jun 27 22:51 clojure.jar@ -> 
clojure.git/clojure.jar
lrwxr-xr-x   1 gslepak  gslepak     65 Jun 27 22:58 jline.jar@ -> 
/Users/gslepak/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar
drwxr-xr-x  18 gslepak  gslepak    612 Jun 26 18:33 leiningen.git/

I tried liebke's clj stuff (it's listed there as clj.git), but because of this 
issue I don't use it: http://github.com/liebke/clj/issues#issue/4

Basically I've downloaded the clojure 1.1 release, but also the git repository 
for 1.2. Similar for clojure-contrib, except I grabbed the last working build 
from the nightly builds on http://build.clojure.org/job/clojure-contrib/ 
because the git repo doesn't compile (it has bugs).

Anyway, I then have clojure.jar and clojure-contrib.jar symlinks pointing to 
the versions I want.

In addition, I've written my own clj script that's pretty smart and makes it 
easy to switch between clojure versions, you can find its source here:

http://www.taoeffect.com/other/clj.lsp.html

It requires newlisp installed, but newlisp is like ~200KB and simple to install 
via a standard OS X install package obtainable from newlisp.org. Plus it's an 
awesome scripting language.

My clj script will respect the CLOJURE_HOME environment variable, and I can 
also easily point it to use another clojure jar file using the -c flag.

Finally, I've also had problems getting the Clojure.tmbundle working. Rather, 
everything works, except for the REPL, which seems completely broken and 
nothing I tried would fix it. I even tried getting some of the forked versions 
but they all failed as well.

I recommend IntelliJ, it might not be the perfect Mac solution, but it's a 
really nice IDE and I've made setup instructions here:

http://gregslepak.posterous.com/clojure-development-with-intellijs-la-clojure

Hope that helps!

- Greg

On Jun 30, 2010, at 12:01 PM, Glenn, Jacob wrote:

> On 6/29/10 8:46 PM, "Sean Corfield" <seancorfi...@gmail.com> wrote:
> 
>> I just installed that (on OS X 10.6.4) and I went this route:
>> 
>> Download the ZIP file. Rename it to remove the .zip extension (leaving
>> the .jar extension). Double-click the .jar file. It fired up a
>> clj.main process (which didn't seem to go away?) but it did create the
>> ~/.clj tree.
>> 
>> I copied ~/.clj/bin/clj to ~/bin/ (which is already on my path) and
>> then ran: clj
>> 
>> Up popped clj.main again, this time with a REPL in a window
>> proclaiming Clojure 1.2.0-master-SNAPSHOT and the familiar user=>
>> prompt.
>> 
>> I tried clj repl and clj list, both of which also worked. I haven't
>> tried much else. I couldn't figure out how to get lein to take
>> advantage of the new .clj stuff so if anyone has advice... :)
>> 
>> See if that route works better for you.
>> 
>> BTW, I was also using Clojure-MacOSX which seemed to be a really nice
>> package since it included the TextMate bundle as well.
> 
> Thanks very much for your help. Where are you getting the .zip file you
> describe? As far as I can tell the Github project only includes a link to
> the .jar file. When I try to run that file by double-clicking it I get an
> error dialog: "The Java JAR file 'clj-1.0.0-SNAPSHOT-standalone.jar' could
> not be launched. Check the Console for possible error messages." When I try
> running 'java -jar clj-1.0.0-SNAPSHOT-standalone.jar self-install' from the
> command line I get the exception and stack trace I described previously.
> 
> I'm still using Clojure 1.1.0 - maybe I need 1.2 to make it work?
> 
> Re: the TextMate bundle, I installed that too but can't get it to see my
> installed Clojure libraries. I've symlinked all my .jar files to
> ~/Library/Java/Extensions, and I can use them just fine from the REPL. But
> when I try to run a file using the Clojure bundle commands in TextMate I get
> a FileNotFoundException. If I do 'Get java.class.path' I can see a few .jar
> files in my classpath under $TM_PROJECT_DIRECTORY$TM_BUNDLE_PATH/Vendor. I
> have not defined shell variables for $TM_PROJECT_DIRECTORY or
> $TM_BUNDLE_PATH in the TextMate preferences, but it looks like everything
> gets installed into ~/Library/Application Support/
> TextMate/Bundles/Clojure.tmbundle/Vendor. Out of desperation I symlinked my
> .jar files into that directory too, but they still don't show up in the
> classpath via TextMate (though as I said I can use them from the REPL with
> no problem). Of course what I would really like is to be able to drop .jar
> files into some directory and have them Just Work .
> 
> So yeah, obviously I don't have a clue how to set this stuff up. If there
> are any other Mac-using clojurians who want to share best practices for
> getting up and running that would be a great help.
> 
> Jake
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to