Fork me on GitHub
#sql
<
2019-02-13
>
CyberSapiens9717:02:02

i'm having a problem trying to create a table using sqlite3

CyberSapiens9717:02:03

anyone who can help, thanks in advance

noisesmith17:02:21

how are you loading the sqlite database adaptor? never mind, just scrolled down and saw

noisesmith17:02:39

I get a different error

user=> (require '[db.booksdb])
CompilerException java.sql.SQLException: path to 'db/database.db': '/private/tmp/booksdb/db' does not exist, compiling:(db/booksdb.clj:16:1) 

noisesmith17:02:32

creating a "db" directory fixes the error and the code works - did you restart your repl after defining the new deps?

👍 5
CyberSapiens9717:02:17

OMG, i didn't restarted the REPL

CyberSapiens9717:02:33

took me over 1 hour and i just had to restart cider.... thanks!

noisesmith17:02:26

I should have a sign over my desk that says "error makes no sense? exit repl, run lein clean, and start the repl again"

CyberSapiens9717:02:55

hahaha, that's so true, i'll hopefully remember this next time

noisesmith17:02:22

technically my first question was relevant: > how are you loading the sqlite database adaptor? since you had defined it but not performed the restart that would load it :D