weavejester / environ

Library for managing environment variables in Clojure
924 stars 71 forks source link

IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol #61

Closed davidsevcik closed 8 years ago

davidsevcik commented 8 years ago

Hi, I have trouble to use environ in a new clojure project https://github.com/reevoo/elsa (just starting with clojure, sorry if it's something trivial I've forgot). When I try to run the app or just repl I'm getting following error when requiring environ.core:

With clojure 1.7.0:

user=> (use 'environ.core :verbose)
(clojure.core/load "/environ/core")
(clojure.core/load "/clojure/edn")

CompilerException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol, compiling:(environ/core.clj:39:1)

When I tried to downgrade to clojure 1.5.1 (same as is used in this lib):

user=> (use 'environ.core :verbose)
(clojure.core/load "/environ/core")
(clojure.core/load "/clojure/edn")

IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:505)

Do you have any idea what could couse it? Thanks.

weavejester commented 8 years ago

Do you have a .lein-env file or .boot-env file in your project directory?

Also, the (pst) command will print the stacktrace associated with the error.

davidsevcik commented 8 years ago

Oh, I didn't have .lein-env in edn format. Thanks @weavejester for suggesting (pst) it helped me to get the cause of error.

weavejester commented 8 years ago

As the README says, you shouldn't be manually changing .lein-env:

The first two sources are set by the lein-environ and boot-environ plugins respectively, and should not be edited manually.

davidsevcik commented 8 years ago

Got it, I'm using dotenv in ruby and just assumed environ will work the same way. I have to read readme more carefully. Thanks.