Comments (8)
I had the same issue and here's what worked for me:
- Adding
:min-lein-version "2.0.0"
to project.clj - Creating a Procfile with
web: lein ring server
This was enough to make the app run on Heroku and I've made no other changes to the template except uncommenting the code in core.clj
and web.clj
. This Procfile is probably not the best way to do this, since ring docs mention that lein ring server
starts a development server. I've tried replacing it with web: lein with-profile production trampoline ring server-headless
and it still works, but I'm not sure if it's in any way better.
from curriculum.
Has anyone solved this?
from curriculum.
This has not been solved, and I don't know that anyone has reproduced it yet, either.
from curriculum.
Is there a Procfile that needs to be added to deploy to heroku and if so how does it look like. I'm new to clojure but with my experiences with nodejs, I always added a procfile to my node apps.
from curriculum.
Hi @kwistens , @bridgethillyer, and @selasiehanson,
I wrote the docs for Heroku deployment, and I'm getting an application error too.
A Procfile isn't necessary in most languages, since Heroku can figure out what language you're using and create a default web process type to start the application server.
But a Procfile does provide more control over deployment, and given the error here without one, I'm trying various iterations of the Procfile as recommended here. Here are a couple:
web: lein with-profile production trampoline run -m global_growth.web
- adding
:uberjar-name "global-growth-standalone.jar"
to project.clj
and creating a Procfile with the following:
web: java $JVM_OPTS -cp target/global-growth-standalone.jar clojure.main -m global_growth.web
For the latter, I get this log error: Exception in thread "main" java.lang.Exception: Cannot find anything to run for: global_growth.web
This makes sense since there isn't a function called main in web.clj. I also tried deploying with clojure.main-page
and clojure.main-routes
instead of clojure.main
. No dice.
I haven't had success yet. Perhaps someone with more robust knowledge of the JVM can help?
from curriculum.
Thanks, @allait!
Your comments, along with this, were very helpful.
Here's what worked for me. Almost identical to yours, but it includes a slight modification to the Procfile:
- Add
:min-lein-version "2.0.0"
to project.clj - Create a Procfile with
web: lein ring server-headless $PORT
I will update the docs accordingly.
from curriculum.
Looks like this issue was resolved a long while ago, but the issue remains open.
Closing it now!
from curriculum.
@kpfell 👍 Thanks! Hope all is well.
from curriculum.
Related Issues (20)
- Add "'git' is not recognized as an internal or external command" to install troubleshooting HOT 2
- "Infix vs. prefix" slide is slightly confusing HOT 1
- Add map and reduce to student cheatsheet HOT 2
- Intermediate curriculum HOT 4
- Sample quil app instructions in Installfest - copy to other platforms HOT 1
- Module 6, slide 10: Provide a more detailed example for get-names exercise HOT 2
- Slides vs markdown? HOT 3
- Make exercises less mathy/numbers oriented HOT 4
- Make gh-pages branch default? HOT 2
- Update slide for maps in the data structures section covers too much material.
- Additional slides for curriculum HOT 1
- LightTable instarepl depreciated HOT 3
- Link to PDF not working
- Improving macOS install instructions HOT 4
- proposal: delete master branch HOT 3
- Is the material here suitable for self taught a.k.a freecodecamp? HOT 1
- nogogiri security vulnerability
- Creating multi-language filters for documentation and curriculum HOT 2
- Alternatives to Nightcode editor? HOT 2
- Beginner curriculum HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curriculum.