CompilerException java.lang.RuntimeException: Unable to resolve character: - [Clojure]

I have this function save-messagein the namespace guestbook.models.dband I try to run it in repl, but I get the following:

guestbook.models.db> (save-message "A" "Hi"
                                   )
CompilerException java.lang.RuntimeException: Unable to resolve symbol: save-message in this context, compiling:(/private/var/folders/xc/ypy3lqhj08xg2hjc6g81qwl80000gn/T/form-init7598384514150426113.clj:1:1) 

Reboot and try again and I get the same error

guestbook.models.db> (:reload 'guestbook.models.db)
nil
guestbook.models.db> (save-message "A" "Hi"
                                   )
CompilerException java.lang.RuntimeException: Unable to resolve symbol: save-message in this context, compiling:(/private/var/folders/xc/ypy3lqhj08xg2hjc6g81qwl80000gn/T/form-init7598384514150426113.clj:1:1) 
guestbook.models.db> 

What am I doing wrong?

+4
source share
1 answer

You want to say

(require :reload 'guestbook.models.db)

This reloads this single namespace; if you use instead :reload-all, it will also recursively reload all namespaces loaded guestbook.models.db, directly or indirectly.

See more details (doc require).


Regarding (:reload 'guestbook.models.db):

Clojure, , , . , (:foo {:foo 1}) 1. , nil. , , , ( , , ).

+5

All Articles