I am following this blog to upload a Dart app to Heroku and run it. I have gotten to the point where the app is successfully deployed to Heroku, but the app is not running. The following is from the Heroku logs:
2012-12-20T18:04:57+00:00 heroku[web.1]: Starting process with command `dart TestApp.dart`
2012-12-20T18:04:57+00:00 app[web.1]: bash: dart: command not found
2012-12-20T18:04:58+00:00 heroku[web.1]: Process exited with status 127
2012-12-20T18:04:58+00:00 heroku[web.1]: State changed from starting to crashed
The following is the contents of my Procfile
web: dart TestApp.dart
Can anyone point me towards a solution to this error?
You should have forgotten to add the buildpack to the config. See the getting started of Heroku Buildpack for Dart.
Basically, you have to use the following commands :
$> heroku create myapp_name -s cedar
$> heroku config:add BUILDPACK_URL=https://github.com/igrigorik/heroku-buildpack-dart.git
WARNING : With the last version of buildpack it seems dart command is no more in the PATH. A workaround is to use the full path in Procfile:
web: ./dart-sdk/bin/dart TestApp.dart
Related
Im trying to host my object detection api on heroku but i can't due to it not recognizing my
Procfile, which is a file and not a text file. the way its spelled is Procfile, its contents are
web:gunicorn app:app
the way i know that its the Procfile thats the problem is because when i run bash and look at the root directory of the heroku git i see Procfile but when i look at the logs i see that no web process is running and on the dashboard the dynos is completely empty.
i've tried doing
web: gunicorn app: app instead of web:gunicorn app:app
to no avail, i've made sure that gunicorn is in the requirements.txt and know that its pip installing the requirements.txt as the cmd tells me that it is when i do git push heroku master. i've tried doing echo>Procfile and then modifying the contents of the file. i've tried both echo "web:gunicorn app:app"> Procfile and echo web:gunicorn app:app>Procfile i tried doing heroku ps:scale web=1 and get Scaling web dynos... failed ! No such process type web defined in Procfile. and when i do heroku ps i get nothing
I have a simple Ruby application that works fine inside of the Heroku console (heroku run ruby myapp.rb). How can I have it running fully autonomously?
It's not a web based application, it basically reads some information from a website and sends out an email.
I created a Procfile
worker: ruby myapp.rb
Log says "config.ru not found", what should I put in my config.ru?
Update
Still not working...
Procfile:
worker: bundle exec ruby parse_reg.rb
config.ru:
require './parse_reg'
Heroku log:
2014-09-17T03:27:39+00:00 heroku[slug-compiler]: Slug compilation
started 2014-09-17T03:27:47+00:00 heroku[slug-compiler]: Slug
compilation finished 2014-09-17T03:27:47.743136+00:00 heroku[api]:
Release v16 created by xyz#xyz.com
2014-09-17T03:27:47.743136+00:00 heroku[api]: Deploy d4e3e5f by
xyz#xyz.com 2014-09-17T03:27:48.989789+00:00 heroku[web.1]:
State changed from crashed to starting
2014-09-17T03:27:50.837609+00:00 heroku[web.1]: Starting process with
command bundle exec rackup config.ru -p 44532
2014-09-17T03:28:51.121035+00:00 heroku[web.1]: Error R10 (Boot
timeout) -> Web process failed to bind to $PORT within 60 seconds of
launch 2014-09-17T03:28:51.121241+00:00 heroku[web.1]: Stopping
process with SIGKILL
seems like my Procfile is not being read??? this is really strange!
Just make a config.ru in your project root and add
require './myapp'
Making sure that the myapp.rb file is a script that will run by just requiring it, which it looks like since it works by calling ruby myapp.rb.
OK. I figured out the issue
I had to run the following to start the worker job
heroku ps:scale worker=1
reference: https://devcenter.heroku.com/articles/run-non-web-java-processes-on-heroku
I'm following through this tutorial when finally deploying to Heroku via git push heroku master, and visiting the webpage, it fails with an Application Error. heroku logs has the following:
2013-12-18T18:27:30.109623+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=${PORT} -DapplyEvolutions.default=true -Ddb.default.url=${DATABASE_URL} -Ddb.default.driver=org.postgresql.Driver`
2013-12-18T18:27:31.051319+00:00 app[web.1]: bash: target/start: No such file or directory
Indeed, there's no target/start file at all. How do I fix this?
Change Procfile to:
web: target/universal/stage/bin/play ...
The location of play has changed
I am trying to run an application on heroku.
Although, as soon as it starts, the app crashes. The log shows this:
2013-07-20T20:06:20.086425+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-20T20:06:27.769210+00:00 heroku[web.1]: Starting process with command `serveup ./public`
2013-07-20T20:06:28.888722+00:00 app[web.1]: bash: serveup: command not found
2013-07-20T20:06:30.942655+00:00 heroku[web.1]: Process exited with status 127
2013-07-20T20:06:30.973063+00:00 heroku[web.1]: State changed from starting to crashed
My Procfile contains this: web: serveup ./public
This command should be working, as its provided by a person that is already running this app on heroku. Any suggestions as to what might be causing this?
Edit
serveup exists within node_modules/serveup and is installed by npm install .
Update
I had to add the following command before deploying the application:
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs
I believe it was fixed because of this.
It appears that serveup doesn't exist on the PATH you've got set for your heroku configuration. Assuming it has been installed, you need to either modify your PATH variable to include it's location or you need include an explicit path to serveup in your Procfile.
So I'm following the tutorial in this link: https://devcenter.heroku.com/articles/django#deploy-to-heroku
once i do "heroku ps" i get:
=== web: `python manage.py runserver 0.0.0.0:$PORT --noreload`
web.1: crashed 2013/02/18 20:22:37 (~ 8m ago)
I don't exactly understand what is the problem here, can someone help? am i suppose to have my Procfile where manage.py is? I tried to move it over to there, but the same error still shows up.
btw my logs are:
2013-02-19T04:36:22+00:00 heroku[api]: Scale to web=1 by deathlordx87#yahoo.com
2013-02-19T04:41:14+00:00 heroku[api]: Scale to web=1 by deathlordx87#yahoo.com
2013-02-19T04:43:10+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-19T04:43:17+00:00 heroku[web.1]: Starting process with command `python manage.py runserver 0.0.0.0:31831 --noreload`
2013-02-19T04:43:18+00:00 app[web.1]: python: can't open file 'manage.py': [Errno 2] No such file or directory
2013-02-19T04:43:19+00:00 heroku[web.1]: Process exited with status 2
2013-02-19T04:43:19+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-19T04:44:05+00:00 heroku[api]: Scale to web=1 by deathlordx87#yahoo.com
I faced the same problem once. You need to configure your settings.py file properly. Since Heroku doesn't support sqlite3 databases so you should check that the database portion of the settings.py file is configured correctly.
Check my minimal sample app successfully deployed to Heroku https://github.com/shinigamiryuk/Django-Heroku-Sample-Application
The log line can't open file 'manage.py' suggests that the file is missing or can't be found. Did you add manage.py to your git depo before deploying to heroku? Is manage.py stored in a different directory from your Procfile/where the program runs?
I suspect your project (if it follows the Two Scoops layout) has manage.py inside a project directory and not in your repository root.
To keep this layout, create a Procfile and within it script a directory change before running gunicorn.
See this answer for an example.