geoDjango on heroku
up vote
1
down vote
favorite
I'm using heroku to develop a django backend. I would like to enable geoDjango to use spatial feature with my models.
I followed all the steps that are describe on the django and heroku docs but I'm still getting an error when I want to run manage.py migrate or other request and command on the server:
OSError: /app/.heroku/vendor/lib: cannot open shared object file: No such file or directory
I did check with bash if it was true and yes there no lib directory in my vendor. I don't know a lot about buildpacks and config on heroku so I don't know where to start to fix this error.
Here is my buildspack:
- https://github.com/cyberdelia/heroku-geo-buildpack.git
- heroku/python
And in my .buildpacks I tried to put:
https://github.com/cyberdelia/heroku-geo-buildpack.git#e1b845b
https://github.com/heroku/heroku-buildpack-python.git
I also tried different forks that were not able to build at all...
I did put the paths in my settings:
GEOS_LIBRARY_PATH = os.environ.get('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.environ.get('GDAL_LIBRARY_PATH')
I'm a bit lost so help would be greatly appreciated
EDIT:
So I tried to downgrade my stack to heroku-16 (it was heroku-18) and it build but when I want to migrate it show me a new error message:
OSError: /app/.heroku/vendor/lib: cannot read file data: Is a directory
And when I try to follow this tutorial I can't even build and get this:
-----> geos/gdal/proj app detected
Using geos version: <?xml version="1.0" encoding="UTF-8"?>
Using gdal version: <?xml version="1.0" encoding="UTF-8"?>
Using proj version: <?xml version="1.0" encoding="UTF-8"?>
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 82: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 88: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 94: [: too many arguments
cp: target '/tmp/build_a7cfd7a56646fe632a93fc752b8ee03d/.heroku/vendor/lib/.' is not a directory
! Push rejected, failed to compile geos/gdal/proj app.
! Push failed
django heroku gdal geodjango geos
add a comment |
up vote
1
down vote
favorite
I'm using heroku to develop a django backend. I would like to enable geoDjango to use spatial feature with my models.
I followed all the steps that are describe on the django and heroku docs but I'm still getting an error when I want to run manage.py migrate or other request and command on the server:
OSError: /app/.heroku/vendor/lib: cannot open shared object file: No such file or directory
I did check with bash if it was true and yes there no lib directory in my vendor. I don't know a lot about buildpacks and config on heroku so I don't know where to start to fix this error.
Here is my buildspack:
- https://github.com/cyberdelia/heroku-geo-buildpack.git
- heroku/python
And in my .buildpacks I tried to put:
https://github.com/cyberdelia/heroku-geo-buildpack.git#e1b845b
https://github.com/heroku/heroku-buildpack-python.git
I also tried different forks that were not able to build at all...
I did put the paths in my settings:
GEOS_LIBRARY_PATH = os.environ.get('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.environ.get('GDAL_LIBRARY_PATH')
I'm a bit lost so help would be greatly appreciated
EDIT:
So I tried to downgrade my stack to heroku-16 (it was heroku-18) and it build but when I want to migrate it show me a new error message:
OSError: /app/.heroku/vendor/lib: cannot read file data: Is a directory
And when I try to follow this tutorial I can't even build and get this:
-----> geos/gdal/proj app detected
Using geos version: <?xml version="1.0" encoding="UTF-8"?>
Using gdal version: <?xml version="1.0" encoding="UTF-8"?>
Using proj version: <?xml version="1.0" encoding="UTF-8"?>
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 82: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 88: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 94: [: too many arguments
cp: target '/tmp/build_a7cfd7a56646fe632a93fc752b8ee03d/.heroku/vendor/lib/.' is not a directory
! Push rejected, failed to compile geos/gdal/proj app.
! Push failed
django heroku gdal geodjango geos
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm using heroku to develop a django backend. I would like to enable geoDjango to use spatial feature with my models.
I followed all the steps that are describe on the django and heroku docs but I'm still getting an error when I want to run manage.py migrate or other request and command on the server:
OSError: /app/.heroku/vendor/lib: cannot open shared object file: No such file or directory
I did check with bash if it was true and yes there no lib directory in my vendor. I don't know a lot about buildpacks and config on heroku so I don't know where to start to fix this error.
Here is my buildspack:
- https://github.com/cyberdelia/heroku-geo-buildpack.git
- heroku/python
And in my .buildpacks I tried to put:
https://github.com/cyberdelia/heroku-geo-buildpack.git#e1b845b
https://github.com/heroku/heroku-buildpack-python.git
I also tried different forks that were not able to build at all...
I did put the paths in my settings:
GEOS_LIBRARY_PATH = os.environ.get('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.environ.get('GDAL_LIBRARY_PATH')
I'm a bit lost so help would be greatly appreciated
EDIT:
So I tried to downgrade my stack to heroku-16 (it was heroku-18) and it build but when I want to migrate it show me a new error message:
OSError: /app/.heroku/vendor/lib: cannot read file data: Is a directory
And when I try to follow this tutorial I can't even build and get this:
-----> geos/gdal/proj app detected
Using geos version: <?xml version="1.0" encoding="UTF-8"?>
Using gdal version: <?xml version="1.0" encoding="UTF-8"?>
Using proj version: <?xml version="1.0" encoding="UTF-8"?>
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 82: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 88: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 94: [: too many arguments
cp: target '/tmp/build_a7cfd7a56646fe632a93fc752b8ee03d/.heroku/vendor/lib/.' is not a directory
! Push rejected, failed to compile geos/gdal/proj app.
! Push failed
django heroku gdal geodjango geos
I'm using heroku to develop a django backend. I would like to enable geoDjango to use spatial feature with my models.
I followed all the steps that are describe on the django and heroku docs but I'm still getting an error when I want to run manage.py migrate or other request and command on the server:
OSError: /app/.heroku/vendor/lib: cannot open shared object file: No such file or directory
I did check with bash if it was true and yes there no lib directory in my vendor. I don't know a lot about buildpacks and config on heroku so I don't know where to start to fix this error.
Here is my buildspack:
- https://github.com/cyberdelia/heroku-geo-buildpack.git
- heroku/python
And in my .buildpacks I tried to put:
https://github.com/cyberdelia/heroku-geo-buildpack.git#e1b845b
https://github.com/heroku/heroku-buildpack-python.git
I also tried different forks that were not able to build at all...
I did put the paths in my settings:
GEOS_LIBRARY_PATH = os.environ.get('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.environ.get('GDAL_LIBRARY_PATH')
I'm a bit lost so help would be greatly appreciated
EDIT:
So I tried to downgrade my stack to heroku-16 (it was heroku-18) and it build but when I want to migrate it show me a new error message:
OSError: /app/.heroku/vendor/lib: cannot read file data: Is a directory
And when I try to follow this tutorial I can't even build and get this:
-----> geos/gdal/proj app detected
Using geos version: <?xml version="1.0" encoding="UTF-8"?>
Using gdal version: <?xml version="1.0" encoding="UTF-8"?>
Using proj version: <?xml version="1.0" encoding="UTF-8"?>
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 82: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 88: [: too many arguments
/app/tmp/buildpacks/3174f4234c5151450fcaba5f50a050126498959c8209a7a6057230bfb29be2eaef3ae0098ab726ef807728f7b4792e31db50a2b89636ae181d9e71b03f2f83c1/bin/compile: line 94: [: too many arguments
cp: target '/tmp/build_a7cfd7a56646fe632a93fc752b8ee03d/.heroku/vendor/lib/.' is not a directory
! Push rejected, failed to compile geos/gdal/proj app.
! Push failed
django heroku gdal geodjango geos
django heroku gdal geodjango geos
edited Nov 13 at 10:10
asked Nov 11 at 16:27
Colin Jean-Saunier
215
215
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
So I finally managed to find a solution, I had setup two variable in my settings.py as it was said in different tutorial and on the official doc:
GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
But I don't know why those variable happend to be:
/app/.heroku/vendor/lib
And that's why it didn't work, so my solution is just to hardcode my paths for heroku:
GEOS_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgeos_c.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgdal.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GDAL_LIBRARY_PATH')
Be careful, you really need to put the "_c" to "libgeos_c.so" otherwise it's not working.
I hope it helps
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
So I finally managed to find a solution, I had setup two variable in my settings.py as it was said in different tutorial and on the official doc:
GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
But I don't know why those variable happend to be:
/app/.heroku/vendor/lib
And that's why it didn't work, so my solution is just to hardcode my paths for heroku:
GEOS_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgeos_c.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgdal.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GDAL_LIBRARY_PATH')
Be careful, you really need to put the "_c" to "libgeos_c.so" otherwise it's not working.
I hope it helps
add a comment |
up vote
0
down vote
accepted
So I finally managed to find a solution, I had setup two variable in my settings.py as it was said in different tutorial and on the official doc:
GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
But I don't know why those variable happend to be:
/app/.heroku/vendor/lib
And that's why it didn't work, so my solution is just to hardcode my paths for heroku:
GEOS_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgeos_c.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgdal.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GDAL_LIBRARY_PATH')
Be careful, you really need to put the "_c" to "libgeos_c.so" otherwise it's not working.
I hope it helps
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
So I finally managed to find a solution, I had setup two variable in my settings.py as it was said in different tutorial and on the official doc:
GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
But I don't know why those variable happend to be:
/app/.heroku/vendor/lib
And that's why it didn't work, so my solution is just to hardcode my paths for heroku:
GEOS_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgeos_c.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgdal.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GDAL_LIBRARY_PATH')
Be careful, you really need to put the "_c" to "libgeos_c.so" otherwise it's not working.
I hope it helps
So I finally managed to find a solution, I had setup two variable in my settings.py as it was said in different tutorial and on the official doc:
GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
But I don't know why those variable happend to be:
/app/.heroku/vendor/lib
And that's why it didn't work, so my solution is just to hardcode my paths for heroku:
GEOS_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgeos_c.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = '/app/.heroku/vendor/lib/libgdal.so' if os.environ.get('ENV') == 'HEROKU' else os.getenv('GDAL_LIBRARY_PATH')
Be careful, you really need to put the "_c" to "libgeos_c.so" otherwise it's not working.
I hope it helps
answered Nov 13 at 16:08
Colin Jean-Saunier
215
215
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250766%2fgeodjango-on-heroku%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown