Skip to content

Instantly share code, notes, and snippets.

@yaniv-aknin
Created April 23, 2012 06:36
Show Gist options
  • Save yaniv-aknin/2469151 to your computer and use it in GitHub Desktop.
Save yaniv-aknin/2469151 to your computer and use it in GitHub Desktop.
% heroku apps:create -s cedar restpaste
Creating restpaste... done, stack is cedar
http://restpaste.herokuapp.com/ | git@heroku.com:restpaste.git
Git remote heroku added
% heroku addons:remove shared-database:5mb
! WARNING: Potentially Destructive Action
! This command will affect the app: restpaste
! To proceed, type "restpaste" or re-run this command with --confirm restpaste
> restpaste
----> Removing shared-database:5mb from restpaste... failed
! Add-on not installed
% heroku labs:enable user_env_compile
----> Enabling user_env_compile for restpaste... done
WARNING: This feature is experimental and may change or be removed without notice.
% heroku config:add DISABLE_INJECTION=1
Adding config vars and restarting app... donegit p, v2
DISABLE_INJECTION => 1
% git push heroku master (6:53:10:teolicy:master)
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (14/14), 3.75 KiB, done.
Total 14 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
-----> Python/Django app detected
-----> Preparing Python interpreter (2.7.2)
-----> Creating Virtualenv version 1.7
New python executable in .heroku/venv/bin/python2.7
Also creating executable in .heroku/venv/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
Running virtualenv with interpreter /usr/local/bin/python2.7
-----> Activating virtualenv
-----> Installing dependencies using Pip version 1.0.2
Downloading/unpacking Django==1.4 (from -r requirements.txt (line 1))
Creating supposed download cache at /app/tmp/repo.git/.cache/pip_downloads
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FD%2FDjango%2FDjango-1.4.tar.gz
Running setup.py egg_info for package Django
Downloading/unpacking gevent==0.13.7 (from -r requirements.txt (line 2))
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fg%2Fgevent%2Fgevent-0.13.7.tar.gz
Running setup.py egg_info for package gevent
Downloading/unpacking greenlet==0.3.4 (from -r requirements.txt (line 3))
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fg%2Fgreenlet%2Fgreenlet-0.3.4.zip
Running setup.py egg_info for package greenlet
Downloading/unpacking gunicorn==0.14.2 (from -r requirements.txt (line 4))
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fg%2Fgunicorn%2Fgunicorn-0.14.2.tar.gz
Running setup.py egg_info for package gunicorn
warning: no files found matching '*' under directory 'debian'
Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /usr/local/lib/python2.7 (from -r requirements.txt (line 5))
Installing collected packages: Django, gevent, greenlet, gunicorn
Running setup.py install for Django
changing mode of build/scripts-2.7/django-admin.py from 600 to 755
changing mode of /tmp/build_3i1a45kj1uvf8/.heroku/venv/bin/django-admin.py to 755
Running setup.py install for gevent
building 'gevent.core' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c gevent/core.c -o build/temp.linux-x86_64-2.7/gevent/core.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/gevent/core.o -levent -o build/lib.linux-x86_64-2.7/gevent/core.so
Linking /tmp/build_3i1a45kj1uvf8/.heroku/venv/build/gevent/build/lib.linux-x86_64-2.7/gevent/core.so to /tmp/build_3i1a45kj1uvf8/.heroku/venv/build/gevent/gevent/core.so
Running setup.py install for greenlet
building 'greenlet' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c greenlet.c -o build/temp.linux-x86_64-2.7/greenlet.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/greenlet.o -o build/lib.linux-x86_64-2.7/greenlet.so
Linking /tmp/build_3i1a45kj1uvf8/.heroku/venv/build/greenlet/build/lib.linux-x86_64-2.7/greenlet.so to /tmp/build_3i1a45kj1uvf8/.heroku/venv/build/greenlet/greenlet.so
Running setup.py install for gunicorn
warning: no files found matching '*' under directory 'debian'
Installing gunicorn_paster script to /tmp/build_3i1a45kj1uvf8/.heroku/venv/bin
Installing gunicorn script to /tmp/build_3i1a45kj1uvf8/.heroku/venv/bin
Installing gunicorn_django script to /tmp/build_3i1a45kj1uvf8/.heroku/venv/bin
Successfully installed Django gevent greenlet gunicorn
Cleaning up...
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size is 9.4MB
-----> Launching... done, v5
http://restpaste.herokuapp.com deployed to Heroku
To git@heroku.com:restpaste.git
* [new branch] master -> master
##
## tried curl-ing the app, received an R11 (Bad bind) error, realized I screwed up binding and fixed,
## committed and pushed again
% git push -f heroku master
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (14/14), 3.74 KiB, done.
Total 14 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
-----> Python/Django app detected
-----> Preparing Python interpreter (2.7.2)
ImportError: No module named site
-----> Creating Virtualenv version
! Virtualenv corrupt, rebuilding.
ImportError: No module named site
-----> Activating virtualenv
/app/slug-compiler/lib/../buildpacks/python/bin/compile: line 172: pip: command not found
-----> Installing dependencies using Pip version
/app/slug-compiler/lib/../buildpacks/python/bin/compile: line 173: pip: command not found
! Heroku push rejected, failed to compile Python/django app
To git@heroku.com:restpaste.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:restpaste.git'
%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment