vimclojureleiningenswankslimv

How to setup classpath for slimv and ritz


I would like to resolve my problem for classpath.Could you tell me how to do?

I can do the following.

I can eval (+ 1 1) in vim(slimv) by pushing ,e.

Then slimv display the followings.

user> 
(+ 1 1)
2

However,I can not do the followings.

1.When I eval the the following code in vim(slimv) by pushing ,e,

(use '[clojure.contrib.str-utils :only (re-split)])

2.Slimv displays the following error.

; Evaluation aborted on java.io.FileNotFoundException: Could not locate clojure/contrib/str_utils__init.class or clojure/contrib/str_utils.clj on classpath:

My enviroment is the followings.

project.clj

(defproject helloworld "1.0.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]]
  :plugins [[lein-ritz "0.7.0"]]
  )

~/.lein/profiles.clj

{:user {:plugins [
      [lein-ritz  "0.7.0"]
  ]}}

ref

lein ritz setup error


Solution

  • Have you tried clojure.string?

    (use '[clojure.string :only (split)])
    
    (split "clojure8*)-6contrib&(*does^&$not*_^%exist^*#anymore" #"[^a-zA-Z]+")
    => ["clojure" "contrib" "does" "not" "exist" "anymore"]
    

    BTW all clojure.contrib have been migrated to separated libraries http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go