2
votes

I am having trouble figuring one of several error messages that seem to have to do with using :require and dependencies in project.clj. I'm getting an error from trying to load a core.clj into lein repl. Also, I am wondering what the relationship is between project.clj dependencies, and trying to :use or :require to load Clojure modules in core.clj.

Here is the error message from trying to load a core.clj in lein repl.

FileNotFoundException Could not locate clj_record/boot__init.class or clj_record/boot.clj on classpath: clojure.lang.RT.load (RT.java:430)

with this project.clj

(defproject bene-sql "1.0.0-SN"
  :description "Connects to MySQL Benetrak database"
  :dependencies [[org.clojure/clojure "1.3.0"]])

and this core.clj

(ns bene-sql.core
  (:require clj-record.boot)
  (:require [clojure.string :as cstr])
  (:use clojure-csv.core))

(defn ret-csv-file
    "Returns a lazy sequence generated by parse-csv."

    [fnam]
    (let [  csv-data (slurp fnam)
            csv-file (parse-csv csv-data)]
        csv-file))

So, I am asking three things.

I want to test core.clj and need to fix what is causing the error. So, what do I need to do to fix the error?

Also, other than Clojure itself, do I have to have dependencies in project.clj? It appears having a dependency line causes the module to be fetched.

The third question is, what is the current version of clj-record, so I can make it a dependency in project.clj?

Thank you.

1

1 Answers

3
votes

the clj-record github page shows version 1.1.2-SNAPSHOT as the current development version

lein search clj-record came up with:

arthur@a:~/$ lein search clj-record
 == Results from clojars - Showing page 1 / 1 total
[clj-record "1.0-SNAPSHOT"] A pseudo-port of ActiveRecord to the Clojure programming language
...
[clj-record "1.1.1"] A pseudo-port of ActiveRecord to the Clojure programming language

so i would add a line like

[clj-record/clj-record "1.1.1"]

to project.clj