Heroku deployment - command not found - heroku

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.

Related

Deploying simple Ruby code with Heroku

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

play framework not deployed to 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

Heroku procfile "No such process type web defined in Procfile" error

This is the first time I've used Heroku, and the fact that I can't find anyone in Google with a similar error to this means I'm likely doing something way wrong:
I'm following the basic Heroku setup guide here to get my NodeJS application deployed to the web. I'm deployed and trying to check my dynos with:
heroku ps:scale web=1
However, when I do this I get the error:
Scaling web dynos... failed
! No such process type web defined in Procfile.
When I run heroku ps I get nothing returned.
In my app's root directory, I have a file named Procfile (with no extension) which contains:
web: node app.js
The app runs locally without any issues (using foreman start).
Question is why is this occurring, how do I remedy it, should I even care?
Processes to be run on Heroku are defined in a simple text file called: Procfile
The Profile contains a line that defines how each of the processes in your application will run. This will be language specific and examples can be seen on the Heroku Devcenter Procfile article
Please note that the Procfile must be spelt exactly, with the first letter capitalized an all others lower case. There is no file extension for the Procfile. This Procfile should be placed in the root of your project and committed to your local git repository before doing a git push heroku master.
Should you mis-type the filename after it has been added to git, you can rename it using git with the command
git mv ProcFile Procfile
The renamed file will be staged so you can commit the changed file with the command
git commit -m "corrected name of Procfile"
I found the solution myself, from here: https://stackoverflow.com/a/7641259/556006
I had the same problem and I just now I found what was wrong. I first
accidently called the file ProcFile instead of Procfile. Simply
renaming that file did not get picked up by git. I had to do a git rm
ProcFile -f first and then add a new (correctly named) Procfile. After
that, it got pushed correctly by git and got picked up correctly by
Heroku.
I just had this issue myself, but in my case, I was missing a space between web: and the starting command in the Procfile.
For example, I had it wrong this way:
web:gunicorn run:app
Fixed it by adding a space after the colon:
web: gunicorn run:app
I am guessing you've never done git push heroku master -- that is, Heroku has never seen your code.

heroku web crashes

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.

Running Dart App on Heroku

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

Resources