Note that there are some explanatory texts on larger screens.

plurals
  1. POBad File Descriptor - Heroku Foreman
    primarykey
    data
    text
    <p>I'm trying to run <em>hello.py</em> from <a href="https://devcenter.heroku.com/articles/python" rel="nofollow noreferrer">this Python Heroku tutorial</a>. My problems began after running this command: <code>foreman start</code>. I got the following error even though I installed the <a href="https://toolbelt.heroku.com/" rel="nofollow noreferrer">Heroku Toolbelt</a>:</p> <blockquote> <p>foreman is not recognized as an internal or external command, operable program or batch file</p> </blockquote> <p>So I added the location of the foreman file (version 0.63.0) to my <em>path</em>:</p> <blockquote> <p>C:\Program Files (x86)\Heroku\ruby-1.9.2\bin</p> </blockquote> <p>and restarted the command prompt and reran <code>foreman start</code>. Now, I'm getting this error:</p> <pre><code>Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved. C:\Users\me\Desktop\Code\heroku_python_app&gt;venv\Scripts\activate (venv) C:\Users\me\Desktop\Code\heroku_python_app&gt;foreman start Bad file descriptor C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.63.0 /lib/foreman/engine.rb:372:in `read_nonblock' C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.63.0 /lib/foreman/engine.rb:372:in `block (2 levels) in watch_for_output' C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.63.0 /lib/foreman/engine.rb:368:in `loop' C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.63.0 /lib/foreman/engine.rb:368:in `block in watch_for_output' 12:57:38 web.1 | exited with code 1 12:57:38 system | sending SIGKILL to all processes (venv) C:\Users\me\Desktop\Code\heroku_python_app&gt; </code></pre> <p><strong>hello.py</strong></p> <pre><code>import os from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello World' </code></pre> <p><strong>Procfile</strong> </p> <pre><code>web: gunicorn hello:app </code></pre> <p><strong>EDIT 1</strong></p> <p>After reading <a href="https://stackoverflow.com/questions/15399637/cant-start-foreman-in-heroku-tutorial-using-python">this answer</a>, I did the following:</p> <pre><code>gem uninstall foreman gem install foreman -v 0.61.0 </code></pre> <p>However, when I reran <code>foreman start</code> I'm getting this error now</p> <pre><code>(venv) C:\Users\me\Desktop\Code\heroku_python_app&gt;foreman start 14:13:20 web.1 | started with pid 252 14:13:20 web.1 | exited with code 1 14:13:20 system | sending SIGKILL to all processes 14:13:20 | Traceback (most recent call last): 14:13:20 | File "C:\Users\me\Desktop\Code\heroku_python_app\venv\Scri pts\gunicorn-script.py", line 9, in &lt;module&gt; (venv) C:\Users\me\Desktop\Code\heroku_python_app&gt; </code></pre> <p>Any assistance will be really appreciated. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload