Flask and Heroku - ModuleNotFoundError: No module named 'app' - heroku

I'm trying to deploy a Flask app to Heroku. After deploying, application crashes and I get an error ModuleNotFoundError: No module named 'app'.
Project structure:
.
├── ./espncricinfo
│ ├── ./exceptions.py
│ ├── ./__init__.py
│ ├── ./match.py
│ ├── ./player.py
│ ├── ./summary.py
│
├── ./pycricbuzz
│ ├──./cricbuzz.py
│ ├──./ __init__.py
├── ./pycricket
│ ├── ./cricket.py
│ ├──./ __init__.py
├── ./static
│ ├── ./bblpics
│ ├── ./fonts
│ ├── ./images
│ ├── ./favascripts
│ ├── ./stylesheets
├── ./templates
│ ├── ./index.html
│ ├── ./base.html
│ ├── ./app.html
│ ├── ./Smmary.html
│ ├── ./Scorecard.html
│ ├── ./News.html
├── ./__init__.py
│
├── ./Procfile
│
├── ./requirements.txt
│
├── ./runtime.txt
│
├── ./bbl.py
│
└── ./score.py
I'm doing in virtualenv
I pip installed these dependices
pip install Flask
pip install requests
pip install pytz
pip install praw
pip install beautifulsoup4
pip install google-api-python-client
pip install python-dateutil
pip install python-espncricinfo
pip install pandas
pip install gunicorn
pip freeze > requirements.txt
echo web: gunicorn app:app > Procfile
echo python-3.6.4 >runtime.txt
git init
heroku login
heroku create the-wall-cricket-scores
git add .
git commit -m "fdf"
git push heroku master
heroku open
This is my main init.py
app = Flask(__name__)
if __name__=="__main__":
app.run(debug=True)
Procfile web: gunicorn app:app
runtime.txt python-3.6.4
Requirements.txt-
beautifulsoup4==4.6.0
bs4==0.0.1
certifi==2018.1.18
chardet==3.0.4
click==6.7
dateparser==0.7.0
Flask==0.12.2
google-api-python-client==1.6.5
gunicorn==19.7.1
httplib2==0.10.3
idna==2.6
itsdangerous==0.24
Jinja2==2.10
MarkupSafe==1.0
numpy==1.14.0
oauth2client==4.1.2
pandas==0.22.0
praw==5.3.0
prawcore==0.13.0
pyasn1==0.4.2
pyasn1-modules==0.2.1
python-dateutil==2.6.1
python-espncricinfo==0.3.1
pytz==2018.3
regex==2018.2.8
requests==2.18.4
rsa==3.4.2
six==1.11.0
tzlocal==1.5.1
update-checker==0.16
uritemplate==3.0.0
urllib3==1.22
Werkzeug==0.14.1
I get an error as follow :
Error full details:
2018-02-20T06:52:40.000000+00:00 app[api]: Build succeeded
2018-02-20T06:54:00.350992+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2018-02-20T06:54:01.598198+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2018-02-20T06:54:03.409972+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Starting gunicorn 19.7.1
2018-02-20T06:54:03.413413+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Listening at: http://0.0.0.0:34331 (4)
2018-02-20T06:54:03.413643+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Using worker: sync
2018-02-20T06:54:03.420766+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [8] [INFO] Booting worker with pid: 8
2018-02-20T06:54:03.431463+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [8] [ERROR] Exception in worker process
2018-02-20T06:54:03.431467+00:00 app[web.1]: Traceback (most recent call last):
2018-02-20T06:54:03.431469+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
2018-02-20T06:54:03.431471+00:00 app[web.1]: worker.init_process()
2018-02-20T06:54:03.431473+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
2018-02-20T06:54:03.431474+00:00 app[web.1]: self.load_wsgi()
2018-02-20T06:54:03.431476+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
2018-02-20T06:54:03.431478+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-02-20T06:54:03.431480+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2018-02-20T06:54:03.431482+00:00 app[web.1]: self.callable = self.load()
2018-02-20T06:54:03.431483+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-02-20T06:54:03.431485+00:00 app[web.1]: return self.load_wsgiapp()
2018-02-20T06:54:03.431487+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-02-20T06:54:03.431489+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-02-20T06:54:03.431490+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
2018-02-20T06:54:03.431492+00:00 app[web.1]: __import__(module)
2018-02-20T06:54:03.431534+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2018-02-20T06:54:03.431765+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [8] [INFO] Worker exiting (pid: 8)
2018-02-20T06:54:03.473017+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [9] [INFO] Booting worker with pid: 9
2018-02-20T06:54:03.484252+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [9] [ERROR] Exception in worker process
2018-02-20T06:54:03.484255+00:00 app[web.1]: Traceback (most recent call last):
2018-02-20T06:54:03.484257+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
2018-02-20T06:54:03.484258+00:00 app[web.1]: worker.init_process()
2018-02-20T06:54:03.484260+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
2018-02-20T06:54:03.484262+00:00 app[web.1]: self.load_wsgi()
2018-02-20T06:54:03.484263+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
2018-02-20T06:54:03.484265+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-02-20T06:54:03.484267+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2018-02-20T06:54:03.484268+00:00 app[web.1]: self.callable = self.load()
2018-02-20T06:54:03.484270+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-02-20T06:54:03.484271+00:00 app[web.1]: return self.load_wsgiapp()
2018-02-20T06:54:03.484273+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-02-20T06:54:03.484275+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-02-20T06:54:03.484277+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
2018-02-20T06:54:03.484278+00:00 app[web.1]: __import__(module)
2018-02-20T06:54:03.484338+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2018-02-20T06:54:03.484677+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [9] [INFO] Worker exiting (pid: 9)
2018-02-20T06:54:03.590746+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Shutting down: Master
2018-02-20T06:54:03.590997+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Reason: Worker failed to boot.
2018-02-20T06:54:03.801591+00:00 heroku[web.1]: Process exited with status 3
2018-02-20T06:54:04.041064+00:00 heroku[web.1]: State changed from starting to crashed
2018-02-20T06:54:04.029283+00:00 heroku[web.1]: Process exited with status 3
2018-02-20T06:54:03.896607+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Starting gunicorn 19.7.1
2018-02-20T06:54:03.897225+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Listening at: http://0.0.0.0:13017 (4)
2018-02-20T06:54:03.897355+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Using worker: sync
2018-02-20T06:54:03.901981+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [8] [INFO] Booting worker with pid: 8
2018-02-20T06:54:03.907379+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [8] [ERROR] Exception in worker process
2018-02-20T06:54:03.907383+00:00 app[web.1]: Traceback (most recent call last):
2018-02-20T06:54:03.907385+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
2018-02-20T06:54:03.907387+00:00 app[web.1]: worker.init_process()
2018-02-20T06:54:03.907389+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
2018-02-20T06:54:03.907391+00:00 app[web.1]: self.load_wsgi()
2018-02-20T06:54:03.907393+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
2018-02-20T06:54:03.907394+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-02-20T06:54:03.907396+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2018-02-20T06:54:03.907398+00:00 app[web.1]: self.callable = self.load()
2018-02-20T06:54:03.907400+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-02-20T06:54:03.907402+00:00 app[web.1]: return self.load_wsgiapp()
2018-02-20T06:54:03.907404+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-02-20T06:54:03.907406+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-02-20T06:54:03.907408+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
2018-02-20T06:54:03.907410+00:00 app[web.1]: __import__(module)
2018-02-20T06:54:03.907417+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2018-02-20T06:54:03.907561+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [8] [INFO] Worker exiting (pid: 8)
2018-02-20T06:54:03.950849+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Shutting down: Master
2018-02-20T06:54:03.950970+00:00 app[web.1]: [2018-02-20 06:54:03 +0000] [4] [INFO] Reason: Worker failed to boot.
2018-02-20T06:54:48.667089+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=the-wall-cricket.herokuapp.com request_id=ac09678c-ef2d-4f3a-9d96-f0c60232eef3 fwd="157.49.23.47" dyno= connect= service= status=503 bytes= protocol=https
2018-02-20T06:54:51.281797+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=the-wall-cricket.herokuapp.com request_id=c779ab65-1b04-443a-b17b-438cfe914a17 fwd="157.49.23.47" dyno= connect= service= status=503 bytes= protocol=https
2018-02-20T06:54:51.189245+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=the-wall-cricket.herokuapp.com request_id=6d88e51d-44c6-4389-aac5-c24595aad59c fwd="157.49.105.219" dyno= connect= service= status=503 bytes= protocol=https
2018-02-20T06:54:51.849753+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=the-wall-cricket.herokuapp.com request_id=501e291a-0426-477b-ab30-b9e2c00865fb fwd="157.49.23.47" dyno= connect= service= status=503 bytes= protocol=https
2018-02-20T06:54:52.823503+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=the-wall-cricket.herokuapp.com request_id=7173cf2e-806d-4675-8e9e-442624e55f1c fwd="157.49.23.47" dyno= connect= service= status=503 bytes= protocol=https
what's wrong with this, How can I successfully deploy an app??

web:gunicorn app:app is standard Procfile. It expects that your .py file should be named app.py.
If you want to change .py name you should change Procfile as well.
web:gunicorn my_app_name:app
After that you can name your file - my_app_name.py

On your local machine, at the base of your repository, you need to add a Procfile (exactly like this).
Inside that, paste only one line:
web: gunicorn :app
Example: If you want to trigger init.py, then:
web: gunicorn init:app

In my case, this was resolved after I made the following changes, of course committing the changes before pushing to heroku:
1) ran pip freeze > requirements.txt,
2) moved my app.py to a different directory, and updated Procfile, manage.py -all files importing app.py- and to reflect the new location. I'm not sure if moving the file actually made a difference, it seems unlikely, but regardless, it's worth verifying all files that import app have the correct path

Related

getting this error in heroku logs --app <my heroku app name > " ModuleNotFoundError: No module named 'sklearn.ensemble.forest' "

My whole project is here:https://github.com/martinberberi/Cryptocurrency
2021-04-22T01:17:26.958640+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-04-22T01:17:26.958640+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-04-22T01:17:26.958640+00:00 app[web.1]: self.callable = self.load()
2021-04-22T01:17:26.958640+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-04-22T01:17:26.958641+00:00 app[web.1]: return self.load_wsgiapp()
2021-04-22T01:17:26.958641+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-04-22T01:17:26.958641+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-04-22T01:17:26.958641+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-04-22T01:17:26.958641+00:00 app[web.1]: mod = importlib.import_module(module)
2021-04-22T01:17:26.958642+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2021-04-22T01:17:26.958642+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-04-22T01:17:26.958642+00:00 app[web.1]: File "", line 1030, in _gcd_import
2021-04-22T01:17:26.958642+00:00 app[web.1]: File "", line 1007, in _find_and_load
2021-04-22T01:17:26.958643+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2021-04-22T01:17:26.958643+00:00 app[web.1]: File "", line 680, in _load_unlocked
2021-04-22T01:17:26.958643+00:00 app[web.1]: File "", line 790, in exec_module
2021-04-22T01:17:26.958643+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2021-04-22T01:17:26.958644+00:00 app[web.1]: File "/app/app.py", line 8, in
2021-04-22T01:17:26.958644+00:00 app[web.1]: model = pickle.load(open("model.pkl", "rb"))
2021-04-22T01:17:26.958644+00:00 app[web.1]: ModuleNotFoundError: No module named 'sklearn.ensemble.forest'
2021-04-22T01:17:26.958794+00:00 app[web.1]: [2021-04-22 01:17:26 +0000] [8] [INFO] Worker exiting (pid: 8)
2021-04-22T01:17:27.098709+00:00 app[web.1]: [2021-04-22 01:17:27 +0000] [4] [INFO] Shutting down: Master
2021-04-22T01:17:27.098741+00:00 app[web.1]: [2021-04-22 01:17:27 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-04-22T01:17:27.155404+00:00 heroku[web.1]: Process exited with status 3
2021-04-22T01:17:27.217794+00:00 heroku[web.1]: State changed from up to crashed
2021-04-22T01:17:34.872134+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=crypto-currency-api.herokuapp.com request_id=a6e5bd5d-a3f8-4a3b-8476-0de3c868c9ff fwd="24.91.184.7" dyno= connect= service= status=503 bytes= protocol=https
2021-04-22T01:25:28.477934+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=crypto-currency-api.herokuapp.com request_id=304ca018-b9eb-4569-8382-95820c101776 fwd="24.91.184.7" dyno= connect= service= status=503 bytes= protocol=https
2021-04-22T01:43:00.030720+00:00 heroku[web.1]: State changed from crashed to starting
2021-04-22T01:43:09.254965+00:00 heroku[web.1]: Starting process with command gunicorn app:app
2021-04-22T01:43:12.985695+00:00 app[web.1]: [2021-04-22 01:43:12 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-04-22T01:43:12.987665+00:00 app[web.1]: [2021-04-22 01:43:12 +0000] [4] [INFO] Listening at: http://0.0.0.0:18453 (4)
2021-04-22T01:43:12.987739+00:00 app[web.1]: [2021-04-22 01:43:12 +0000] [4] [INFO] Using worker: sync
2021-04-22T01:43:12.992120+00:00 app[web.1]: [2021-04-22 01:43:12 +0000] [7] [INFO] Booting worker with pid: 7
2021-04-22T01:43:13.061650+00:00 app[web.1]: [2021-04-22 01:43:13 +0000] [8] [INFO] Booting worker with pid: 8
2021-04-22T01:43:13.577131+00:00 heroku[web.1]: State changed from starting to up
2021-04-22T01:43:17.020315+00:00 app[web.1]: [2021-04-22 01:43:17 +0000] [8] [ERROR] Exception in worker process
2021-04-22T01:43:17.020322+00:00 app[web.1]: Traceback (most recent call last):
2021-04-22T01:43:17.020323+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-04-22T01:43:17.020324+00:00 app[web.1]: worker.init_process()
2021-04-22T01:43:17.020324+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-04-22T01:43:17.020324+00:00 app[web.1]: self.load_wsgi()
2021-04-22T01:43:17.020325+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-04-22T01:43:17.020325+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-04-22T01:43:17.020326+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-04-22T01:43:17.020327+00:00 app[web.1]: self.callable = self.load()
2021-04-22T01:43:17.020327+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-04-22T01:43:17.020327+00:00 app[web.1]: return self.load_wsgiapp()
2021-04-22T01:43:17.020328+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-04-22T01:43:17.020328+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-04-22T01:43:17.020328+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-04-22T01:43:17.020329+00:00 app[web.1]: mod = importlib.import_module(module)
2021-04-22T01:43:17.020329+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2021-04-22T01:43:17.020330+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-04-22T01:43:17.020330+00:00 app[web.1]: File "", line 1030, in _gcd_import
2021-04-22T01:43:17.020331+00:00 app[web.1]: File "", line 1007, in _find_and_load
2021-04-22T01:43:17.020331+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2021-04-22T01:43:17.020331+00:00 app[web.1]: File "", line 680, in _load_unlocked
2021-04-22T01:43:17.020332+00:00 app[web.1]: File "", line 790, in exec_module
2021-04-22T01:43:17.020332+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2021-04-22T01:43:17.020332+00:00 app[web.1]: File "/app/app.py", line 8, in
2021-04-22T01:43:17.020332+00:00 app[web.1]: model = pickle.load(open("model.pkl", "rb"))
2021-04-22T01:43:17.020333+00:00 app[web.1]: ModuleNotFoundError: No module named 'sklearn.ensemble.forest'
2021-04-22T01:43:17.020626+00:00 app[web.1]: [2021-04-22 01:43:17 +0000] [8] [INFO] Worker exiting (pid: 8)
2021-04-22T01:43:17.034993+00:00 app[web.1]: [2021-04-22 01:43:17 +0000] [7] [ERROR] Exception in worker process
2021-04-22T01:43:17.034994+00:00 app[web.1]: Traceback (most recent call last):
2021-04-22T01:43:17.034995+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-04-22T01:43:17.034995+00:00 app[web.1]: worker.init_process()
2021-04-22T01:43:17.034996+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-04-22T01:43:17.034996+00:00 app[web.1]: self.load_wsgi()
2021-04-22T01:43:17.034996+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-04-22T01:43:17.034997+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-04-22T01:43:17.034997+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-04-22T01:43:17.034997+00:00 app[web.1]: self.callable = self.load()
2021-04-22T01:43:17.034998+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-04-22T01:43:17.034998+00:00 app[web.1]: return self.load_wsgiapp()
2021-04-22T01:43:17.034999+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-04-22T01:43:17.034999+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-04-22T01:43:17.034999+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-04-22T01:43:17.034999+00:00 app[web.1]: mod = importlib.import_module(module)
2021-04-22T01:43:17.035000+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2021-04-22T01:43:17.035000+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-04-22T01:43:17.035000+00:00 app[web.1]: File "", line 1030, in _gcd_import
2021-04-22T01:43:17.035001+00:00 app[web.1]: File "", line 1007, in _find_and_load
2021-04-22T01:43:17.035001+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2021-04-22T01:43:17.035001+00:00 app[web.1]: File "", line 680, in _load_unlocked
2021-04-22T01:43:17.035002+00:00 app[web.1]: File "", line 790, in exec_module
2021-04-22T01:43:17.035002+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2021-04-22T01:43:17.035002+00:00 app[web.1]: File "/app/app.py", line 8, in
2021-04-22T01:43:17.035002+00:00 app[web.1]: model = pickle.load(open("model.pkl", "rb"))
2021-04-22T01:43:17.035003+00:00 app[web.1]: ModuleNotFoundError: No module named 'sklearn.ensemble.forest'
2021-04-22T01:43:17.035268+00:00 app[web.1]: [2021-04-22 01:43:17 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-04-22T01:43:17.235372+00:00 app[web.1]: [2021-04-22 01:43:17 +0000] [4] [WARNING] Worker with pid 7 was terminated due to signal 15
2021-04-22T01:43:17.325108+00:00 app[web.1]: [2021-04-22 01:43:17 +0000] [4] [INFO] Shutting down: Master
2021-04-22T01:43:17.325184+00:00 app[web.1]: [2021-04-22 01:43:17 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-04-22T01:43:17.411261+00:00 heroku[web.1]: Process exited with status 3
2021-04-22T01:43:17.517724+00:00 heroku[web.1]: State changed from up to crashed
2021-04-22T01:46:48.000000+00:00 app[api]: Build started by user martinberberi#gmail.com
2021-04-22T01:47:37.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/b703f07c-128a-4f0c-99d4-3220035e7703/activity/builds/c615ff41-0b06-4c90-9e60-e96e9044443c
2021-04-22T01:49:13.000000+00:00 app[api]: Build started by user martinberberi#gmail.com
2021-04-22T01:50:16.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/b703f07c-128a-4f0c-99d4-3220035e7703/activity/builds/a78474d4-687d-4e7c-afef-b4e5956ea04f
the issue was smaller
see the important file working directory
Procfile
runtime.txt
requirements.txt
$ pip freeze > requirements.txt
push code again
more refernce

Heroku crashes after a rake db:migrate

This application was already working fine on Heroku. After the last
heroku run rake db:migrate
I found the following logs with errors:
2016-03-04T19:40:50.904316+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
2016-03-04T19:40:50.904317+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
2016-03-04T19:40:50.904317+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
2016-03-04T19:40:50.904318+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
2016-03-04T19:40:50.904319+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2016-03-04T19:40:50.904319+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
2016-03-04T19:40:50.904320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2016-03-04T19:40:50.904321+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
2016-03-04T19:40:50.904323+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
2016-03-04T19:40:50.904322+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
2016-03-04T19:40:50.904323+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
2016-03-04T19:40:50.904321+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2016-03-04T19:40:50.904324+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
2016-03-04T19:40:50.904327+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
2016-03-04T19:40:50.904326+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
2016-03-04T19:40:50.904327+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
2016-03-04T19:40:50.904325+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
2016-03-04T19:40:50.904325+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
2016-03-04T19:40:50.904328+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2016-03-04T19:40:50.904329+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
2016-03-04T19:40:50.904329+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2016-03-04T19:40:50.904330+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2016-03-04T19:40:50.904331+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2016-03-04T19:40:50.904331+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2016-03-04T19:40:50.904334+00:00 app[web.1]: from /app/config.ru:in `new'
2016-03-04T19:40:50.904335+00:00 app[web.1]: from /app/config.ru:in `<main>'
2016-03-04T19:40:50.904335+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2016-03-04T19:40:50.904336+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2016-03-04T19:40:50.904337+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2016-03-04T19:40:50.904338+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2016-03-04T19:40:50.904338+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2016-03-04T19:40:50.904339+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
2016-03-04T19:40:50.904339+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2016-03-04T19:40:50.904340+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2016-03-04T19:40:50.904341+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
2016-03-04T19:40:50.904342+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-03-04T19:40:50.904342+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-03-04T19:40:50.904346+00:00 app[web.1]: from bin/rails:8:in `require'
2016-03-04T19:40:50.904343+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-03-04T19:40:50.904346+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2016-03-04T19:40:50.904344+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-03-04T19:40:50.904347+00:00 app[web.1]: from bin/rails:8:in `<main>'
2016-03-04T19:40:51.575383+00:00 heroku[web.1]: Process exited with status 1
2016-03-04T19:40:51.615222+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-04T19:41:25+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.05 sample#load-avg-5m=0.09 sample#load-avg-15m=0.11 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797896.0kB sample#memory-cached=519196kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:42:25+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.02 sample#load-avg-5m=0.075 sample#load-avg-15m=0.1 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798020.0kB sample#memory-cached=519196kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:43:29+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.04 sample#load-avg-5m=0.075 sample#load-avg-15m=0.1 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797656.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:44:30+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.105 sample#load-avg-5m=0.085 sample#load-avg-15m=0.105 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797688.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:45:46+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.09 sample#load-avg-5m=0.085 sample#load-avg-15m=0.105 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797928.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:46:31+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.035 sample#load-avg-5m=0.07 sample#load-avg-15m=0.095 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797796.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:47:33+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.01 sample#load-avg-5m=0.055 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797980.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:48:35+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.02 sample#load-avg-5m=0.055 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798144.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:49:23+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.045 sample#load-avg-5m=0.055 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798260.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:50:25+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.015 sample#load-avg-5m=0.045 sample#load-avg-15m=0.08 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797936.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:51:31.568822+00:00 heroku[worker.1]: State changed from crashed to starting
2016-03-04T19:51:36.943055+00:00 heroku[worker.1]: Starting process with command `bundle exec rake jobs:work`
2016-03-04T19:51:37.500878+00:00 heroku[worker.1]: State changed from starting to up
2016-03-04T19:51:40+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.17 sample#load-avg-5m=0.08 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798928.0kB sample#memory-cached=519208kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
2016-03-04T19:51:41.578717+00:00 app[worker.1]: rake aborted!
2016-03-04T19:51:41.578736+00:00 app[worker.1]: Don't know how to build task 'jobs:work'
2016-03-04T19:51:41.578969+00:00 app[worker.1]:
2016-03-04T19:51:41.578997+00:00 app[worker.1]: (See full trace by running task with --trace)
2016-03-04T19:51:42.166907+00:00 heroku[worker.1]: Process exited with status 1
2016-03-04T19:51:42.176706+00:00 heroku[worker.1]: State changed from up to crashed
And then I tried:
git push heroku master
After that my application suddenly doesn't work in my production environment (heroku) and I'm not able to simulate it in my local environment.
I'm getting the following error-logs for pushing the git:
2016-03-04T19:18:22.489968+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
2016-03-04T19:18:22.489969+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'
2016-03-04T19:18:22.489970+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
2016-03-04T19:18:22.489971+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
2016-03-04T19:18:22.489971+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
2016-03-04T19:18:22.489972+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
2016-03-04T19:18:22.489975+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
2016-03-04T19:18:22.489976+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2016-03-04T19:18:22.489976+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2016-03-04T19:18:22.489977+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2016-03-04T19:18:22.489977+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
2016-03-04T19:18:22.489978+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
2016-03-04T19:18:22.489982+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
2016-03-04T19:18:22.489983+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
2016-03-04T19:18:22.489979+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
2016-03-04T19:18:22.489979+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
2016-03-04T19:18:22.489980+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
2016-03-04T19:18:22.489983+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
2016-03-04T19:18:22.489987+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2016-03-04T19:18:22.489985+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
2016-03-04T19:18:22.489985+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
2016-03-04T19:18:22.490001+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
2016-03-04T19:18:22.490002+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2016-03-04T19:18:22.490004+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2016-03-04T19:18:22.490005+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2016-03-04T19:18:22.490026+00:00 app[web.1]: from /app/config.ru:in `new'
2016-03-04T19:18:22.490006+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2016-03-04T19:18:22.490027+00:00 app[web.1]: from /app/config.ru:in `<main>'
2016-03-04T19:18:22.490027+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2016-03-04T19:18:22.490029+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2016-03-04T19:18:22.490030+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2016-03-04T19:18:22.490032+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2016-03-04T19:18:22.490048+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2016-03-04T19:18:22.490049+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
2016-03-04T19:18:22.490050+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2016-03-04T19:18:22.490052+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2016-03-04T19:18:22.490053+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
2016-03-04T19:18:22.490151+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-03-04T19:18:22.490160+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-03-04T19:18:22.490161+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-03-04T19:18:22.490161+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-03-04T19:18:22.490162+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2016-03-04T19:18:22.490162+00:00 app[web.1]: from bin/rails:8:in `require'
2016-03-04T19:18:22.490163+00:00 app[web.1]: from bin/rails:8:in `<main>'
2016-03-04T19:18:23.173071+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-04T19:18:23.174500+00:00 heroku[web.1]: State changed from crashed to starting
2016-03-04T19:18:23.126163+00:00 heroku[web.1]: Process exited with status 1
2016-03-04T19:18:28.828072+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 33437 -e production`
2016-03-04T19:18:35.409674+00:00 app[web.1]: => Booting WEBrick
2016-03-04T19:18:35.409713+00:00 app[web.1]: => Rails 4.2.0 application starting in production on http://0.0.0.0:33437
2016-03-04T19:18:35.409714+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-03-04T19:18:35.409715+00:00 app[web.1]: => Ctrl-C to shutdown server
2016-03-04T19:18:35.409720+00:00 app[web.1]: Exiting
2016-03-04T19:18:35.409736+00:00 app[web.1]: /app/app/controllers/Users/invitations_controller.rb:1:in `<top (required)>': uninitialized constant Users (NameError)
2016-03-04T19:18:35.409737+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
2016-03-04T19:18:35.409737+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'
2016-03-04T19:18:35.409738+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
2016-03-04T19:18:35.409739+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
2016-03-04T19:18:35.409739+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
2016-03-04T19:18:35.409740+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
2016-03-04T19:18:35.409742+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2016-03-04T19:18:35.409741+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2016-03-04T19:18:35.409741+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
2016-03-04T19:18:35.409743+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
2016-03-04T19:18:35.409745+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
2016-03-04T19:18:35.409744+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
2016-03-04T19:18:35.409744+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
2016-03-04T19:18:35.409746+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
2016-03-04T19:18:35.409743+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2016-03-04T19:18:35.409747+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
2016-03-04T19:18:35.409751+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2016-03-04T19:18:35.409750+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
2016-03-04T19:18:35.409748+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
2016-03-04T19:18:35.409755+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2016-03-04T19:18:35.409751+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2016-03-04T19:18:35.409750+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2016-03-04T19:18:35.409756+00:00 app[web.1]: from /app/config.ru:in `new'
2016-03-04T19:18:35.409756+00:00 app[web.1]: from /app/config.ru:in `<main>'
2016-03-04T19:18:35.409758+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2016-03-04T19:18:35.409745+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
2016-03-04T19:18:35.409747+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
2016-03-04T19:18:35.409748+00:00 app[web.1]: from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
2016-03-04T19:18:35.409762+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
2016-03-04T19:18:35.409749+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2016-03-04T19:18:35.409767+00:00 app[web.1]: from bin/rails:8:in `require'
2016-03-04T19:18:35.409761+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2016-03-04T19:18:35.409768+00:00 app[web.1]: from bin/rails:8:in `<main>'
2016-03-04T19:18:35.409758+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2016-03-04T19:18:35.409759+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2016-03-04T19:18:35.409761+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2016-03-04T19:18:35.409762+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-03-04T19:18:35.409763+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-03-04T19:18:35.409766+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-03-04T19:18:35.409767+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2016-03-04T19:18:35.409759+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2016-03-04T19:18:35.409760+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
2016-03-04T19:18:35.409757+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2016-03-04T19:18:35.409766+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-03-04T19:18:36.172209+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-04T19:18:36.156974+00:00 heroku[web.1]: Process exited with status 1
The last thing that I've done is installing and implementing the Devise_invitable Gem (next to my already implemented Devise Gem).
Does anyone see what's going wrong?
This happens in prod but not dev because dev lazy-loads classes, and prod loads them all up front. But it gets an error loading this file:
app/controllers/Users/invitations_controller.rb
It looks like the first line is doing something with the Users class. The path to that file is suspicious as well. Usually in Rails you don't capitalize directories like you've done with Users/invitations_controller.rb.
Since the error is on line 1, I'm guessing you have this:
class Users::InvitationsController
...
end
I think renaming the directory to lowercase users will fix your problem.
Note that this has nothing to do with running migrations. In fact I doubt your migration succeeded, so once you fix this problem and push the fix to Heroku, you should try running it again.

Deploying Jekyll on Heroku Fails

Using Jekyll 2.5.3 on Heroku with Github deployment. Jekyll builds fine locally on OS X, but fails on Heroku. Any ideas on how to fix this would be appreciated.
config.ru
require 'rack/jekyll'
require 'yaml'
run Rack::Jekyll.new
Gemfile
source 'https://rubygems.org'
gem 'bundler'
gem 'jekyll', '~> 2.5'
gem 'jekyll-redirect-from', '~> 0.8'
gem 'html-proofer'
gem 'rack-jekyll'
gem 'compass'
app.json
{
"name":"ninelabs.com",
"scripts":{},
"env":{
"LANG":{
"required":true
},
"RACK_ENV":{
"required":true
}
},
"addons":[]
}
Here's the log showing errors:
Note the line No such file or directory - /apple-icon-72x72.png (Errno::ENOENT)
> 2015-10-04T16:41:32.741506+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 13959`
> 2015-10-04T16:41:37.929983+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/utils.rb:102:in `initialize': No such file or directory - /apple-icon-72x72.png (Errno::ENOENT)
> 2015-10-04T16:41:37.930023+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/utils.rb:102:in `open'
> 2015-10-04T16:41:37.930058+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/utils.rb:102:in `has_yaml_header?'
> 2015-10-04T16:41:37.930076+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:177:in `block in read_directories'
> 2015-10-04T16:41:37.930093+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:172:in `each'
> 2015-10-04T16:41:37.930109+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:172:in `read_directories'
> 2015-10-04T16:41:37.930126+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:151:in `read'
> 2015-10-04T16:41:37.930149+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:49:in `process'
> 2015-10-04T16:41:37.930174+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-jekyll-0.3.5/lib/rack/jekyll.rb:29:in `initialize'
> 2015-10-04T16:41:37.930192+00:00 app[web.1]: from /app/config.ru:3:in `new'
> 2015-10-04T16:41:37.930209+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
> 2015-10-04T16:41:37.930225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
> 2015-10-04T16:41:37.930241+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
> 2015-10-04T16:41:37.930263+00:00 app[web.1]: from /app/config.ru:in `new'
> 2015-10-04T16:41:37.930288+00:00 app[web.1]: from /app/config.ru:in `<main>'
> 2015-10-04T16:41:37.930305+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
> 2015-10-04T16:41:37.930321+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
> 2015-10-04T16:41:37.930337+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
> 2015-10-04T16:41:37.930354+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
> 2015-10-04T16:41:37.930371+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
> 2015-10-04T16:41:37.930400+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
> 2015-10-04T16:41:37.930417+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
> 2015-10-04T16:41:37.930434+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:147:in `start'
> 2015-10-04T16:41:37.930451+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/bin/rackup:4:in `<top (required)>'
> 2015-10-04T16:41:37.930468+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
> 2015-10-04T16:41:37.930489+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
> 2015-10-04T16:41:37.956751+00:00 app[web.1]: Configuration file: /app/_config.yml
> 2015-10-04T16:41:39.069543+00:00 heroku[web.1]: State changed from starting to crashed
> 2015-10-04T16:41:39.062775+00:00 heroku[web.1]: Process exited with status 1

Heroku H13 error a way to fix it?

I have an application running on Heroku, sometimes this error appear :
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/logger.rb:15:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra- 1.3.2/lib/sinatra/base.rb:1334:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in `call'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:80:in `block in pre_process'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:78:in `catch'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:78:in `pre_process'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:53:in `process'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:38:in `receive_data'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/backends/base.rb:63:in `start'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/server.rb:159:in `start'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:86:in `start'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:151:in `run!'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/bin/thin:6:in `<top (required)>'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2012-10-03T17:01:32+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
So what can I do ? ...
Edit : add gemfile
source :rubygems
# use Heroku Toolbelt instead
# gem "heroku"
# sinatra main library
gem "sinatra"
# sinatra plugin for localization
gem "sinatra-r18n"
gem "resolv-ipv6favor"
# Json
gem "json"
# rack middleware csrf protection
gem "rack_csrf"
# database handler | orm
gem "pg"
gem "sequel"
gem "sequel_sluggable"
gem "unicode_utils"
gem "sanitize"
gem "fog"
gem "mail"
gem "thin"
# Full system log
gem 'remote_syslog_logger'
group :development do
gem "awesome_print"
gem "sinatra-reloader"
gem "sqlite3"
end

trouble pushing to heroku using rails app

help would be much appreciated. for some reason, my push to heroku does not work even though my local version is working fine.
i'm deploying a rails app.
after a git push heroku, and heroku run rake db:migrate i get an application error on my website.
EDIT i put up the entire back trace
2012-03-13T20:49:20+00:00 app[web.1]: from
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-03-13T20:49:20+00:00 app[web.1]: from script/rails:6:in `require'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-03-13T20:49:20+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-03-13T20:49:20+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-03-13T20:49:21+00:00 heroku[web.1]: Process exited with status 1
2012-03-13T20:49:21+00:00 heroku[web.1]: State changed from starting to crashed
2012-03-13T21:01:36+00:00 heroku[router]: Error H10 (App crashed) -> GET strong-sunrise-8468.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-03-13T21:03:43+00:00 heroku[web.1]: State changed from crashed to created
2012-03-13T21:03:43+00:00 heroku[web.1]: State changed from created to starting
2012-03-13T21:03:47+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 43183`
2012-03-13T21:03:50+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-03-13T21:03:50+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-03-13T21:03:53+00:00 app[web.1]: => Booting WEBrick
2012-03-13T21:03:53+00:00 app[web.1]: => Rails 3.2.1 application starting in production on http://0.0.0.0:43183
2012-03-13T21:03:53+00:00 app[web.1]: => Call with -d to detach
2012-03-13T21:03:53+00:00 app[web.1]: => Ctrl-C to sh
2012-03-13T21:03:53+00:00 app[web.1]: Exiting
2012-03-13T21:03:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:147:in `block in replace_gem': bcrypt-ruby is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.1/lib/active_model/secure_password.rb:37:in `has_secure_password'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/app/models/user.rb:14:in `<class:User>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/app/models/user.rb:12:in `<top (required)>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:192:in `block in const_missing'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:190:in `each'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:228:in `each'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:190:in `const_missing'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:228:in `constantize'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:229:in `block in constantize'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:259:in `safe_constantize'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/core_ext/string/inflections.rb:66:in `safe_constantize'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/params_wrapper.rb:152:in `_default_wrap_model'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/params_wrapper.rb:169:in `_set_wrapper_defaults'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/app/controllers/users_controller.rb:1:in `<top (required)>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:313:in `depend_on'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `each'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `block in eager_load!'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `each'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `eager_load!'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/config.ru:4:in `require'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-03-13T21:03:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-03-13T21:03:53+00:00 app[web.1]: from script/rails:6:in `require'
2012-03-13T21:03:53+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-03-13T21:03:54+00:00 heroku[web.1]: Process exited with status 1
2012-03-13T21:03:54+00:00 heroku[web.1]: State changed from starting to crashed
2012-03-13T21:04:38+00:00 heroku[run.1]: State changed from created to starting
2012-03-13T21:04:44+00:00 app[run.1]: Awaiting client
2012-03-13T21:04:45+00:00 heroku[run.1]: Process exited with status 0
2012-03-13T21:04:45+00:00 heroku[run.1]: State changed from starting to complete
2012-03-13T21:04:52+00:00 heroku[run.1]: State changed from created to starting
2012-03-13T21:04:58+00:00 app[run.1]: Awaiting client
2012-03-13T21:04:58+00:00 app[run.1]: Starting process with command `bundle exec rake db:migrate`
2012-03-13T21:04:59+00:00 heroku[run.1]: State changed from starting to up
2012-03-13T21:05:04+00:00 heroku[run.1]: Process exited with status 0
2012-03-13T21:05:04+00:00 heroku[run.1]: State changed from up to complete
2012-03-13T21:05:21+00:00 heroku[router]: Error H10 (App crashed) -> GET strong-sunrise-8468.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
i notice there are deprecation warnings, but im following the michael hartl book for beginners learning rails and he said to ignore them.
i did
heroku stack
and i am on the cedar stack as well
inside the environment.rb, the contents are...
1. # Load the rails application
2. require File.expand_path('../application', __FILE__)
3.
4. # Initialize the rails application
5. SampleApp::Application.initialize!
Add this gem to Gemfile
gem 'bcrypt-ruby', '~> 3.0.0'
probably your gem is using it on your local gems.
And don't forget to git add .

Resources