luminus-framework / luminus Goto Github PK
View Code? Open in Web Editor NEWdocumentation site for Luminus framework
Home Page: http://www.luminusweb.net/
documentation site for Luminus framework
Home Page: http://www.luminusweb.net/
It took quite a bit of searching to figure out where bootstrap was being served from. Because Bootstraps location is completely transparent to the end user finding out how to add CSS libraries of their own might be difficult and it would help to have a brief explanation on how to use and change webjars
If I create a brand new app with +aleph
, and run the Uberjar locally (or on Heroku) with java -jar ...
it initiates shutdown sequence immediately without any apparent errors.
This doesn't happen if I use the default server instead.
Everything works as expected with just lein run
(I assume because of the REPL running?)
Here is the log:
[2016-05-27 00:20:47,588][INFO][my-app.env]
-=[my-app started successfully]=-
[2016-05-27 00:20:49,074][INFO][luminus.http-server] starting HTTP server on port 3000
[2016-05-27 00:20:49,196][INFO][my-app.core] #'my-app.config/env started
[2016-05-27 00:20:49,196][INFO][my-app.core] #'my-app.handler/init-app started
[2016-05-27 00:20:49,196][INFO][my-app.core] #'my-app.core/http-server started
[2016-05-27 00:20:49,196][INFO][my-app.core] #'my-app.core/repl-server started
[2016-05-27 00:20:49,196][INFO][my-app.core] #'my-app.core/log started
[2016-05-27 00:20:49,204][INFO][luminus.http-server] HTTP server stopped
[2016-05-27 00:20:49,204][INFO][my-app.env]
-=[my-app has shutdown successfully]=-
[2016-05-27 00:20:49,205][INFO][my-app.core] #'my-app.core/repl-server stopped
[2016-05-27 00:20:49,205][INFO][my-app.core] #'my-app.core/http-server stopped
[2016-05-27 00:20:49,205][INFO][my-app.core] #'my-app.handler/init-app stopped
When the server is started with lein run, configured init and destroy functions are not executed.
Extract of project.clj
:ring {:handler foo.handler/war-handler
:init foo.application/startup
:destroy foo.application/shutdown }
It works if the server is started with
lein ring server
The "with-profile production trampoline" section of the procfile causes app to crash via Heroku deployed start-up process. Removing this section seems to fix it.
I was able to successfully create a standalone jar to deploy my practice application to one of my test servers. When I called the equivalent of:
java -jar /var/myapp/myapp.jar
on my server I got a runtime exception
Exception in thread "main" org.h2.jdbc.JdbcSQLException: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:site.db". Use an absolute path, ~/name, ./name, or the baseDir setting instead.
I looked at the source of the guestbook.db.schema namespace. It seems that the offending line was the value of the :subname key in the db-spec.
:subname (str (io/resource-path) db-store)
It seems as though the h2 no longer likes the call to noir.io/resource-path.
I changed the line to be:
:subname (str "~/hard-path" db-store)
and I no longer get the exception. I didn't submit a pull request because I'm not sure if this is a safe change or if I'm making another mistake somewhere else. This particular code segment is relevant to the skeleton code generated by the
lein new luminus [myapp] +h2
template
Wondering what your thoughts on this change are. Thanks again for all your help.
was reading about Managing Component Lifecycle :) on Configuring the Database page, and noticed that the link to "Managing Component Lifecycle" is broken, since it links to "/docs" vs. "/md".
since I am not sure how things are meant to be organized (I see that some of the links are to specific commits, and there is also docs-1
section), creating an issue rather than a pull request.
here are the affected files, as far I can tell:
resources/docs-1.x/database.md: ...[migrations section](/docs/migrations.md)
resources/docs-1.x/requests.md: ...[response types](/docs/responses.md)
resources/docs-1.x/security.md: ...[routing section](/docs/routes.md#marking_routes_as_restricted)
resources/md/database.md: ...[Database Migrations](/docs/migrations.md)
resources/md/database.md: ...[Managing Component Lifecycle](/docs/components.md)
resources/md/repl.md: ...[deployment section](/docs/deployment.md#enabling_nrepl)
resources/md/requests.md: ...[response types](/docs/responses.md)
resources/md/routes.md: ...[here](/docs/security.md#cross_site_request_forgery_protection)
resources/md/security.md: ...[Routing section](/docs/routes.md#restricting_access)
resources/md/security.md: ...[routing section](/docs/routes.md#marking_routes_as_restricted)
resources/md/security.md: ...[here](/docs/services.md#csrf)
I'm trying to get a brepl (or Austin, or simple-brepl) to work with Luminus. However, even the simplest/oldest brepl (the one that comes with ClojureScript, and is recommended by the ClojureScript book) does not work. Boiled down to its essence, the following command raises an error:
(require 'cljs.repl)
CompilerException java.lang.RuntimeException: No such var: readers/source-logging-push-back-reader, compiling:(cljs/repl.clj:205:21)
Could this be linked to the fact that reader version 0.7 seems to be loaded? (See http://www.marshut.net/iirtuw/script-repljs-won-t-load-from-head.html for a discussion that could be related)
According to the lein-ring documentation, lein ring server
is supposed to auto-reload when source files are changed, but for me, with a new Luminus project, it doesn't.
Steps to reproduce:
lein new luminus testluminusproject && cd testluminusproject
lein ring server
Expected result: About page should come up, because the source file with the changed route was reloaded.
Actual result: 404. Have to kill and restart the server manually for the change to take effect.
This is on Ubuntu Linux if that makes a difference.
Following the websocket tutorial, I found that the server crashes on calling ws-handler due to wrap-formats middleware trying to JSON encode object of class: class org.projectodd.wunderboss.web.undertow.async.websocket.UndertowWebsocketChannel
.
Cloning and running https://github.com/luminus-framework/multi-client-ws-immutant worked without issue and upon closer inspection, I see that there is a mismatch between the example repo and source files generated by lein new luminus ...
.
Removing wrap-formats
solves the problem. Is this middleware necessary, or is JSON encoded/decoded implicitly without it?
I'm using redis as a session store as specified here http://www.luminusweb.net/docs/sessions_cookies.md - I've set cookie expiry to a fixed value (e.g. 30 days) and after I login (the session is created) the session cookie is not sent again thus it's not updating its expiry value. I think there's a missing wrap-noir-session call somewhere.
Hi there,
Perhaps I did things in the wrong order, but it seems that if the database was already created upon starting the Luminus application (via lein ring server
), then it would not recreate the database with the new guestbook table.
So I encountered an error / exception in the form of:
Table "GUESTBOOK" not found; SQL statement: SELECT "GUESTBOOK".* FROM "GUESTBOOK"
This was solved by setting a different filename for db-store
.
Great tutorial otherwise!
Cheers
Hi, I'm trying to upgrade http-kit version to 2.1.11, I tried changing at :dependencies to the new version and running lein deps, but nothing happens, and it still are running with 2.1.4.
Thanks in advance.
I am trying to initialize a template project as shown in the docs: http://www.luminusweb.net/docs#creating_a_new_application
$ lein -v
Leiningen 1.7.1 on Java 1.6.0_27 OpenJDK 64-Bit Server VM
$ lein new luminus guestbook +h2
Wrong number of arguments to new task.
Expected ([project-name] [project-name project-dir])
I encounter this error on the first page request if I reference POST, page requests after this show no error. If I modify my routes/home.clj in any way I end up getting this error again (only on first page request).
Sounds like something cache related.
clojure.lang.Compiler$CompilerException
java.lang.RuntimeException: Unable to resolve symbol: POST in this context, compiling:(testbox/routes/home.clj:17:5)
Compiler.java:6464 clojure.lang.Compiler.analyze
Compiler.java:6406 clojure.lang.Compiler.analyze
Compiler.java:3665 clojure.lang.Compiler$InvokeExpr.parse
Compiler.java:6646 clojure.lang.Compiler.analyzeSeq
Compiler.java:6445 clojure.lang.Compiler.analyze
Compiler.java:6406 clojure.lang.Compiler.analyze
Compiler.java:3719 clojure.lang.Compiler$InvokeExpr.parse
Compiler.java:6646 clojure.lang.Compiler.analyzeSeq
Compiler.java:6445 clojure.lang.Compiler.analyze
Compiler.java:38 clojure.lang.Compiler.access$100
Compiler.java:538 clojure.lang.Compiler$DefExpr$Parser.parse
Compiler.java:6644 clojure.lang.Compiler.analyzeSeq
Compiler.java:6445 clojure.lang.Compiler.analyze
Compiler.java:6406 clojure.lang.Compiler.analyze
Compiler.java:6707 clojure.lang.Compiler.eval
Compiler.java:7130 clojure.lang.Compiler.load
RT.java:370 clojure.lang.RT.loadResourceScript
RT.java:361 clojure.lang.RT.loadResourceScript
RT.java:440 clojure.lang.RT.load
RT.java:411 clojure.lang.RT.load
core.clj:5641 clojure.core/load[fn]
core.clj:5640 clojure.core/load
RestFn.java:408 clojure.lang.RestFn.invoke
core.clj:5446 clojure.core/load-one
core.clj:5486 clojure.core/load-lib[fn]
core.clj:5485 clojure.core/load-lib
RestFn.java:142 clojure.lang.RestFn.applyTo
core.clj:626 clojure.core/apply
core.clj:5524 clojure.core/load-libs
RestFn.java:137 clojure.lang.RestFn.applyTo
core.clj:626 clojure.core/apply
core.clj:5607 clojure.core/require
RestFn.java:421 clojure.lang.RestFn.invoke
reload.clj:21 ring.middleware.reload/wrap-reload[fn]
stacktrace.clj:23 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
stacktrace.clj:86 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
jetty.clj:18 ring.adapter.jetty/proxy-handler[fn]
(Unknown Source) ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle
HandlerWrapper.java:116 org.eclipse.jetty.server.handler.HandlerWrapper.handle
Server.java:363 org.eclipse.jetty.server.Server.handle
AbstractHttpConnection.java:483 org.eclipse.jetty.server.AbstractHttpConnection.handleRequest
AbstractHttpConnection.java:920 org.eclipse.jetty.server.AbstractHttpConnection.headerComplete
AbstractHttpConnection.java:982 org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete
HttpParser.java:635 org.eclipse.jetty.http.HttpParser.parseNext
HttpParser.java:235 org.eclipse.jetty.http.HttpParser.parseAvailable
AsyncHttpConnection.java:82 org.eclipse.jetty.server.AsyncHttpConnection.handle
SelectChannelEndPoint.java:628 org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle
SelectChannelEndPoint.java:52 org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run
QueuedThreadPool.java:608 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob
QueuedThreadPool.java:543 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run
Thread.java:745 java.lang.Thread.run
Caused by java.lang.RuntimeException
Unable to resolve symbol: POST in this context
Util.java:221 clojure.lang.Util.runtimeException
Compiler.java:6940 clojure.lang.Compiler.resolveIn
Compiler.java:6884 clojure.lang.Compiler.resolve
Compiler.java:6845 clojure.lang.Compiler.analyzeSymbol
Compiler.java:6427 clojure.lang.Compiler.analyze
Compiler.java:6406 clojure.lang.Compiler.analyze
Compiler.java:3665 clojure.lang.Compiler$InvokeExpr.parse
Compiler.java:6646 clojure.lang.Compiler.analyzeSeq
Compiler.java:6445 clojure.lang.Compiler.analyze
Compiler.java:6406 clojure.lang.Compiler.analyze
Compiler.java:3719 clojure.lang.Compiler$InvokeExpr.parse
Compiler.java:6646 clojure.lang.Compiler.analyzeSeq
Compiler.java:6445 clojure.lang.Compiler.analyze
Compiler.java:38 clojure.lang.Compiler.access$100
Compiler.java:538 clojure.lang.Compiler$DefExpr$Parser.parse
Compiler.java:6644 clojure.lang.Compiler.analyzeSeq
Compiler.java:6445 clojure.lang.Compiler.analyze
Compiler.java:6406 clojure.lang.Compiler.analyze
Compiler.java:6707 clojure.lang.Compiler.eval
Compiler.java:7130 clojure.lang.Compiler.load
RT.java:370 clojure.lang.RT.loadResourceScript
RT.java:361 clojure.lang.RT.loadResourceScript
RT.java:440 clojure.lang.RT.load
RT.java:411 clojure.lang.RT.load
core.clj:5641 clojure.core/load[fn]
core.clj:5640 clojure.core/load
RestFn.java:408 clojure.lang.RestFn.invoke
core.clj:5446 clojure.core/load-one
core.clj:5486 clojure.core/load-lib[fn]
core.clj:5485 clojure.core/load-lib
RestFn.java:142 clojure.lang.RestFn.applyTo
core.clj:626 clojure.core/apply
core.clj:5524 clojure.core/load-libs
RestFn.java:137 clojure.lang.RestFn.applyTo
core.clj:626 clojure.core/apply
core.clj:5607 clojure.core/require
RestFn.java:421 clojure.lang.RestFn.invoke
reload.clj:21 ring.middleware.reload/wrap-reload[fn]
stacktrace.clj:23 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
stacktrace.clj:86 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
jetty.clj:18 ring.adapter.jetty/proxy-handler[fn]
(Unknown Source) ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle
HandlerWrapper.java:116 org.eclipse.jetty.server.handler.HandlerWrapper.handle
Server.java:363 org.eclipse.jetty.server.Server.handle
AbstractHttpConnection.java:483 org.eclipse.jetty.server.AbstractHttpConnection.handleRequest
AbstractHttpConnection.java:920 org.eclipse.jetty.server.AbstractHttpConnection.headerComplete
AbstractHttpConnection.java:982 org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete
HttpParser.java:635 org.eclipse.jetty.http.HttpParser.parseNext
HttpParser.java:235 org.eclipse.jetty.http.HttpParser.parseAvailable
AsyncHttpConnection.java:82 org.eclipse.jetty.server.AsyncHttpConnection.handle
SelectChannelEndPoint.java:628 org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle
SelectChannelEndPoint.java:52 org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run
QueuedThreadPool.java:608 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob
QueuedThreadPool.java:543 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run
Thread.java:745 java.lang.Thread.run
Quoting from database.md
:
Conventionally the queries are placed in the
resources/sql/queries.sql file. However, once your
application grows you may consider splitting the
queries into multiple files.
Quoting from the yesql
README:
One File, One Query
Create an SQL query.
Note we can supply named parameters (in snake_case) and a comment string:
I had ~15 queries (INSERT, UPDATE, DELETE) in queries.sql
.
And I just ran into the problem that I couldn't get an INSERT
query to work because yesql would do a batch query, which of course failed.
Just splitting all the queries to one file per query fixed this.
Not sure if this is a hard yesql requirement, but they seem to encourage it and it also fixed my problem.
According to : http://www.luminusweb.net/docs/profiles.md I should be able to pass the -dev param.
How else can I allow for for 'instant' ('hot'?) code reloading?
lein ring server -dev
java.lang.NumberFormatException: For input string: "-dev"
at java.lang.NumberFormatException.forInputString (NumberFormatException.java:65)
java.lang.Integer.parseInt (Integer.java:580)
java.lang.Integer.<init> (Integer.java:867)
sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance (Constructor.java:408)
clojure.lang.Reflector.invokeConstructor (Reflector.java:180)
leiningen.ring.server$server.invoke (server.clj:80)
clojure.lang.AFn.applyToHelper (AFn.java:156)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.core$apply.invoke (core.clj:626)
leiningen.ring$ring.doInvoke (ring.clj:23)
clojure.lang.RestFn.invoke (RestFn.java:442)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invoke (core.clj:626)
leiningen.core.main$partial_task$fn__6094.doInvoke (main.clj:263)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:626)
leiningen.core.main$apply_task.invoke (main.clj:313)
lein_environ.plugin$write_env_to_file.invoke (plugin.clj:11)
clojure.lang.Var.invoke (Var.java:394)
clojure.lang.AFn.applyToHelper (AFn.java:165)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invoke (core.clj:626)
robert.hooke$compose_hooks$fn__11735.doInvoke (hooke.clj:40)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:624)
robert.hooke$run_hooks.invoke (hooke.clj:46)
robert.hooke$prepare_for_hooks$fn__11740$fn__11741.doInvoke (hooke.clj:54)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
clojure.lang.RestFn.invoke (RestFn.java:436)
leiningen.core.main$resolve_and_apply.invoke (main.clj:319)
leiningen.core.main$_main$fn__6160.invoke (main.clj:392)
leiningen.core.main$_main.doInvoke (main.clj:385)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invoke (core.clj:624)
clojure.main$main_opt.invoke (main.clj:315)
clojure.main$main.doInvoke (main.clj:420)
clojure.lang.RestFn.invoke (RestFn.java:482)
clojure.lang.Var.invoke (Var.java:401)
clojure.lang.AFn.applyToHelper (AFn.java:171)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)
Given that luminus uses com.taoensso/timbre
as the logging solution, ring-logger-timbre is a better suggestion instead of ring-logger, because it offers a better integration with timbre.
I can send a PR with this minor change if you want me to do so.
I followed docs of "Guestbook Application".
When I run 'lein run', I got the following exception.
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/server/Request : Unsupported major.minor version 52.0, compiling:(qbits/jet/servlet.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7239)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at qbits.jet.server$eval17509$loading__5340__auto____17510.invoke(server.clj:1)
at qbits.jet.server$eval17509.invoke(server.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6771)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:482)
at guestbook2.core$eval73$loading__5340__auto____74.invoke(core.clj:1)
at guestbook2.core$eval73.invoke(core.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6771)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval58$fn__60.invoke(form-init7773318317548719960.clj:1)
at user$eval58.invoke(form-init7773318317548719960.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6772)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.Compiler.loadFile(Compiler.java:7165)
at clojure.main$load_script.invoke(main.clj:275)
at clojure.main$init_opt.invoke(main.clj:280)
at clojure.main$initialize.invoke(main.clj:308)
at clojure.main$null_opt.invoke(main.clj:343)
at clojure.main$main.doInvoke(main.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
I think that jetty9 class file compiled by java8 would be conflicted by java7 jre compiler on my computer.
Do i have to update jre?
I'm building a Stencil app... is there any interest in doing a stencil template, or is someone already working on it? I can probably do that if no one else is.
I was trying to implement CSRF protection as described in the documentation and received a compiler error Caused by: java.lang.RuntimeException: Unable to resolve symbol: add-tag! in this context
Error was resolved (with the assistance of a very helpful fellow Clojure user) by calling
(parser/add-tag! :csrf-token (fn [_ _] (anti-forgery-field)))
instead of
(add-tag! :csrf-token (fn [_ _] (anti-forgery-field)))
as described in the docs. After that I received another compiler error
Caused by: java.lang.RuntimeException: Unable to resolve symbol: anti-forgery-field in this context
which was resolved by adding
[ring.util.anti-forgery :refer [anti-forgery-field]]
to the ns decl.
As relative new comer to clojure, I was stumped for quite a bit. The project I was working on was created with the
lein new luminus [projectname] +h2
template. I think updating the documentation to have those dependencies explicitly declared might make things a bit clearer to people like me who are jumping around the docs after the tutorial.
ps
Really grateful for this framework / your book-- both have been very helpful to me.
Currently, the documentation for clj-ajax, both on the luminus site (http://www.luminusweb.net/docs/clojurescript.md#ajax) and on the clj-ajax github site is a bit too sparse. I'm having difficulty figuring out how to use it without more information about:
If I include a template file from inside another template file within a luminus project using Selmer, I run into problems.
Basically, I get an error saying that the included file was not found because "Access denied". I've tried leaving the path off (hoping it would look inside the same folder as the template that is doing the including) and also tried spelling out the path explicitly.
I wonder if it has something to do with the fact that the luminus template places the templates directly inside the src directory, rather than under the resources directory (what is the reason behind that?).
Any ideas for a workaround other than "don't include templates"?
Thanks.
I'm having trouble getting 'lein ring uberwar' to create a file that will work in either Jetty or Tomcat.
Reproducible steps:
lein new luminus test +swagger
Go into test directory
lein ring server
works fine
lein ring uberwar
Copy war file into jetty webapps folder
Start jetty using java -jar start.jar
Get error in console in form java.lang.IllegalArgumentException: No value supplied for key: {:formats (:json-kw :yaml-kw :edn :transit-json :transit-msgpack), :handle-error #<middleware$handle_req_error compojure.api.middleware$handle_req_error@262d72a>}, compiling:(services.clj:12:1)
...
This is running on Windows 10 preview, using Leiningen 2.5.1 on Java 1.8.0_31 Java HotSpot(TM) 64-Bit Server VM
Any ideas?
Does luminus no longer support command-line invocation of sqlite database support? I ran the following command with no success:
lein new luminus testapp +sqlite
I received the following message:
Unrecognized options: +sqlite
Supported options are: +site, +h2, +dailycred, +jetty, +cljs, +sassc, +swagger, +auth, +war, +http-kit, +cucumber, +aleph, +mongodb, +postgres, +mysql
I thought by running with no options it would default, but no. Am I missing something, or am I just imagining this was originally an option? Sorry for the noob question!
Documentation describes development-middleware and production-middleware as vectors, but in the actual template, they are not.
Currently in a Luminus project, an exception thrown for a production server is handled per the production-middleware
top-level var in middleware.clj
. In particular, wrap-internal-error
from the noir-exception.core
library/namespace takes a keyword arg of :error-response
with a value that must be a string at compile-time (that is sent/displayed to the user's browser).
But is there a good way to build the error page dynamically at run-time, using information in the request? i.e. what I'd like to do is display an error page that's dynamic, using Selmer.
compojure.route/not-found
and have that use a Selmer template.Any suggestions appreciated, thanks in advance!
To reproduce:
~/repos $ lein new luminus test-app +service
Generating a Luminus project.
~/repos $ cd test-app
~/r/test-app $ lein repl
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
Caused by: java.lang.RuntimeException: Unable to resolve symbol: wrap-webjars in this context, compiling:(test_app/middleware.clj:12:7)
at clojure.lang.Compiler.analyze(Compiler.java:6688)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
Other lein tasks like uberjar fail with the same error. The problem is solved by removing the line "webjars" from test-app.middleware/wrap-base
.
I'm not sure whether this is a bug or a misconfiguration in my project. It seems to be some kind of namespace conflict?
If I add the following dependency to project.clj
:
[com.google.http-client/google-http-client-jackson2 "1.20.0"]
Then when I run lein figwheel
I get the following error:
java.lang.ClassNotFoundException: org.apache.http.conn.scheme.SchemeSocketFactory
Adding the following dependency fixes the issue:
[org.apache.httpcomponents/httpclient "4.4.1"]
As a noob I can't figure out how to start the web app from the repl. Following instructions from here: http://www.luminusweb.net/docs/repl.md
scott@endor ~/dev/todo% lein repl
user=> (ns todo.core) ;;; Documentation says I should be automatically in this ns, but I'm in user
nil
todo.core=> (http/start {:port 3000 :init init :handler app}) ;;; Docs say this starts the server
CompilerException java.lang.RuntimeException: Unable to resolve symbol: init in this context, compiling:(/private/var/folders/02/_f132dj94_zcrhvhf4t1_wv80000gn/T/form-init2113808848391849401.clj:1:1)
todo.core=> ;;;???
I have a pretty basic luminus project (lein new luminus foo +postgres) that was working perfectly with lein run
yesterday.
A few minutes ago clojars wasn't reachable and lein run
failed with this error:
Dec 14, 2015 9:09:41 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://clojars.org:443: Network is unreachable
Dec 14, 2015 9:09:41 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://clojars.org:443
Sure, with enough knowledge that's not a real problem, but at the moment I encountered it I was wondering if the deps
step is implicit to leiningen or something I missed in the generated core.clj
- in any case I think it could make sense to document what's going on exactly when doing lein run
in a new project, as I find the setup here a bit more complicated than usual, especially regarding the per-project profiles.clj
(which I didn't know from a previous luminus project).
When doing lein run got unsupported major minor version error. I thought it was downloading everything by itself.
Does it require Java 8?
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/slf4j/impl/StaticLoggerBinder : Unsupported major.minor version 52.0, compiling:(wunderboss/util.clj:28:1)
at clojure.lang.Compiler.load(Compiler.java:7239)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:482)
at immutant.util$eval5264$loading__5340__auto____5265.invoke(util.clj:15)
at immutant.util$eval5264.invoke(util.clj:15)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6771)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at immutant.web.middleware$eval5198$loading__5340__auto____5199.invoke(middleware.clj:15)
at immutant.web.middleware$eval5198.invoke(middleware.clj:15)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6771)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at clojure_app.middleware$eval4943$loading__5340__auto____4944.invoke(middleware.clj:1)
at clojure_app.middleware$eval4943.invoke(middleware.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6771)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:703)
at clojure_app.handler$eval79$loading__5340__auto____80.invoke(handler.clj:1)
at clojure_app.handler$eval79.invoke(handler.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6771)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:482)
at clojure_app.core$eval73$loading__5340__auto____74.invoke(core.clj:1)
at clojure_app.core$eval73.invoke(core.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6771)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5749)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$require.doInvoke(core.clj:5832)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval58$fn__60.invoke(form-init6685182027832907933.clj:1)
at user$eval58.invoke(form-init6685182027832907933.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6772)
at clojure.lang.Compiler.load(Compiler.java:7227)
at clojure.lang.Compiler.loadFile(Compiler.java:7165)
at clojure.main$load_script.invoke(main.clj:275)
at clojure.main$init_opt.invoke(main.clj:280)
at clojure.main$initialize.invoke(main.clj:308)
at clojure.main$null_opt.invoke(main.clj:343)
at clojure.main$main.doInvoke(main.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.UnsupportedClassVersionError: org/slf4j/impl/StaticLoggerBinder : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:141)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:120)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:331)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:283)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:304)
at org.projectodd.wunderboss.WunderBoss.logger(WunderBoss.java:159)
at org.projectodd.wunderboss.ClassPathLocator.<clinit>(ClassPathLocator.java:89)
at org.projectodd.wunderboss.WunderBoss.init(WunderBoss.java:41)
at org.projectodd.wunderboss.WunderBoss.<clinit>(WunderBoss.java:36)
at wunderboss.util$eval5400.invoke(util.clj:47)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6745)
at clojure.core$eval.invoke(core.clj:3081)
at wunderboss.util$eval5321.invoke(util.clj:30)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.load(Compiler.java:7227)
... 143 more
mostly stuff from here http://yogthos.net/posts/2015-02-28-Luminus-2.0.html
When I followed the official tutorial but changed the db engine from h2 to sqlite like lein new luminus guestbook +sqlite
and run lein run migrate
I got
[ERROR][migratus.database] Error creating DB connection for {:connection-uri "jdbc:h2:./guestbook.db.mv.db"}
java.sql.SQLException: No suitable driver found for jdbc:h2:./guestbook.db.mv.db
...
I use Leiningen 2.6.1 on Java 1.8.0_25 Java HotSpot(TM) 64-Bit Server VM on Mac OSX 10.11.3
When opening http://www.luminusweb.net/docs in android google chrome the sidebar is only partially visible. I am not zoomed in.
I'm not having any luck adding history to the cljs luminus template.
I added the appropriate requires/imports and added this code to the core.cljs file:
(let [h (History.)]
(goog.events/listen h EventType/NAVIGATE #(secretary/dispatch! (.-token %)))
(doto h (.setEnabled true)))
This doesn't appear to do anything. Any ideas how to make this work?
Also, ideally, I'd like things to get routed properly when a URL is typed into the browser with the # tag.
Thanks.
lein new luminus a.b.c +site
get a.b.c/src/a.b.c/...
not a.b.c/src/a/b/c/...
I'm trying to use luminus with the +war
profile (and also +swagger +h2
in case it matters) and I run into the following on lein run
without any modifications to the generated project:
[2016-04-30 22:21:21,622][DEBUG][org.jboss.logging] Logging Provider: org.jboss.logging.Log4jLoggerProvider
[2016-04-30 22:21:22,828][INFO][lumi-test.env]
-=[lumi-test started successfully using the development profile]=-
Exception in thread "main" java.lang.RuntimeException: could not start [#'lumi-test.core/http-server] due to, compiling:(/private/var/folders/c6/npth4rmj4wbddccbfx46xtg00000gn/T/form-init3841533603883677885.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: could not start [#'lumi-test.core/http-server] due to
at mount.core$up$fn__100.invoke(core.cljc:92)
at mount.core$up.invokeStatic(core.cljc:92)
at mount.core$up.invoke(core.cljc:90)
at mount.core$bring.invokeStatic(core.cljc:206)
at mount.core$bring.invoke(core.cljc:198)
at mount.core$start.invokeStatic(core.cljc:246)
at mount.core$start.doInvoke(core.cljc:242)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at mount.core$start_with_args.invokeStatic(core.cljc:312)
at mount.core$start_with_args.doInvoke(core.cljc:308)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at lumi_test.core$start_app.invokeStatic(core.clj:44)
at lumi_test.core$start_app.invoke(core.clj:42)
at lumi_test.core$_main.invokeStatic(core.clj:59)
at lumi_test.core$_main.doInvoke(core.clj:51)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval20540.invokeStatic(form-init3841533603883677885.clj:1)
at user$eval20540.invoke(form-init3841533603883677885.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6917)
at clojure.lang.Compiler.load(Compiler.java:7379)
... 14 more
Caused by: clojure.lang.ArityException: Wrong number of args (0) passed to: middleware/wrap-internal-error/fn--16378
at clojure.lang.AFn.throwArity(AFn.java:429)
at clojure.lang.AFn.invoke(AFn.java:28)
at lumi_test.core$eval20421$fn__20422.invoke(core.clj:21)
at mount.core$record_BANG_.invokeStatic(core.cljc:86)
at mount.core$record_BANG_.invoke(core.cljc:85)
at mount.core$up$fn__100.invoke(core.cljc:93)
... 35 more
can this be "1.5.0"
Hi,
I'm a newcomer to Luminus and Clojure in general. While going through the excellent getting started documentation (specifically handling form input) I found myself getting an exception due to a couple of functions not being properly referenced in the namespace.
The first of them was redirect
:
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: redirect in this context, compiling:(guestbook/routes/home.clj:28:9)
The second was POST
:
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: POST in this context, compiling:(guestbook/routes/home.clj:37:3)
Both are easily fixed by adding ring and defining POST in the namespace.
[compojure.core :refer [defroutes GET POST]]
[ring.util.response :refer [redirect]]
I was thinking of opening a PR to improve the documentation on this step but I'm not sure referencing is the correct term or whether you'd like the documentation to change. What do you think?
Thanks!
I want to write into a colum with type ENUM, but i get the error message: ERROR: column \"country_code\" is of type country_codes but expression is of type character varying
I found a hint at stackoverflow, passing an key :stringtype "unspecified". http://stackoverflow.com/questions/14719207/how-do-you-insert-a-postgres-enum-value-using-clojure-jdbc
But this didn't helped. Do you know how to solve this?
I did a grep in my project and they don't seem to be used anywhere, but are included by default. Is this a work in progress?
At bottom of http://www.luminusweb.net/ . See subj.
The docs say
Conventionally the queries are placed in the
resources/sql/queries.sql
file. However, once your application grows you may consider splitting the queries into multiple files.
Assuming I want to split them out (because I do in fact have quite a few), what do I need to do to be able to refer to them, and get them parsed and compiled? Just moving some of them to a new file clearly doesn't work.
This file: http://www.luminusweb.net/docs/guestbook.md
needs instruction to change -add-users-table.down.sql to:
DROP TABLE guestbook;
otherwise tests will fail.
Would be awesome if the sass template included a watch for sass changes to automatically compile them on save.
https://github.com/vladh/lein-sassy
Just getting my feet wet with the whole clojure/figwheel stack and this is probably the only thing I'd have to figure out how to do before being productive immediately.
Im using luminus with +cljs and it is my understanding that this gives me two repls, one from lein figwheel wich gives my ClojureScript and one from lein run for Clojure.
For Clojure the documentation is found here:
http://www.luminusweb.net/docs/repl.md
For CLJS it is found here:
On yogthos.net blog.
However Im not able to use this documentation and get it working with my CIDER Emacs configuration.
The steps i do is:
The error im getting is:
nREPL: Direct connection failed
I have included the nrepl-cider plugin under dev plugins.
Is there any documentation on using luimus with cider repl that im missing or can the existing documentation be updated to help me get this working?
When compiling Luminus project
"$ lein new luminus app +cljs +swagger +auth +mongodb"
"$ lein uberjar" - all goes well, then I run the JAR command "$ java -jar target/app.jar"
He also runs without errors.
The problem is that the browser in the debugger I get an error "/js/app.js 404" and "/css/screen.css"
On the server in the folder "/resources/public/js/app.js" and "/resources/public/css/screen.css" this files is present.
My settings should default profiles:
: profiles
{: uberjar {: omit-source true
: env {: production true}
: hooks [leiningen.cljsbuild]
: cljsbuild
{: jar true
: builds
{: app
{: source-paths ["env / prod / cljs"]
: compiler {: optimizations: advanced: pretty-print false}}}}
: aot: all}
...}
Hi,
I've been pretty impressed with http-kit (http://http-kit.org/) for writing server code in Clojure.
Apologies if this is a basic question (I'm new to Luminus) but is use of http-kit supported within luminus and/or can it be integrated easily as the default web server component?
Mike.
lein run results in
jars
Retrieving pjstadig/humane-test-output/0.8.0/humane-test-output-0.8.0.jar from clojars
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.(main.java:20)
Caused by: java.lang.UnsupportedClassVersionError: org/webjars/WebJarAssetLocator : Unsupported major.minor version 51.0, compiling:(ring/middleware/webjars.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:805)
at my_app.middleware$eval6289$loading__5569__auto____6290.invoke(middleware.clj:1)
at my_app.middleware$eval6289.invokeStatic(middleware.clj:1)
at my_app.middleware$eval6289.invoke(middleware.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:551)
at my_app.handler$eval218$loading__5569__auto____219.invoke(handler.clj:1)
at my_app.handler$eval218.invokeStatic(handler.clj:1)
at my_app.handler$eval218.invoke(handler.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:619)
at my_app.core$eval212$loading__5569__auto____213.invoke(core.clj:1)
at my_app.core$eval212.invokeStatic(core.clj:1)
at my_app.core$eval212.invoke(core.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at user$eval3$loading__5569__auto____4.invoke(user.clj:1)
at user$eval3.invokeStatic(user.clj:1)
at user$eval3.invoke(user.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:359)
at clojure.lang.RT.maybeLoadResourceScript(RT.java:355)
at clojure.lang.RT.doInit(RT.java:475)
at clojure.lang.RT.(RT.java:331)
... 1 more
Caused by: java.lang.UnsupportedClassVersionError: org/webjars/WebJarAssetLocator : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForNameNonLoading(RT.java:2181)
at ring.middleware.webjars$eval6295$loading__5569__auto____6296.invoke(webjars.clj:1)
at ring.middleware.webjars$eval6295.invokeStatic(webjars.clj:1)
at ring.middleware.webjars$eval6295.invoke(webjars.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
... 118 more
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.