Closed evdevdev closed 3 years ago
On additional piece of information. I attempted to install the system dependences using the the buildpack suggestion here. Interesting, when I install this way, I now get the following:
> RGeo::CoordSys::Proj4.supported?
=> false
Judging from #15 (also my issue... sorry to blow you up) - I suspect this is because the buildpack installs proj.h
in an unexpected place? To save you a click, the heroku buildpack source is here.
Is there anything I can do to help further debug this? Any help is very much appreciated.
Update
If I create a one-off dyno on heroku, I can do the following:
~ $ find / -type f -name 'proj.h'
/app/.heroku-geo-buildpack/vendor/include/proj.h
So perhaps that is the issue?
It looks like the compile script for the heroku build pack exports PROJ4_LIBRARY_PATH
- perhaps that could be used to wire these up?
I'm not very familiar with Heroku, but yes it looks like it could be due to that installation path. Also, I checked out the compile script and it looks like the default PROJ version is only 5.2, but version 3+ requires 6.2+ so that might be affecting the build as well.
Solved!
The way to get rgeo-proj4
is as follows.
libproj-dev
libgeos-dev
proj-bin
PROJ_LIB
to have the value /app/.apt/usr/share/proj
And boom! You've got yourself a working stack.
Please let me know if I can be helpful in better documenting this anywhere. Thanks again for the awesome library.
If you want to make a PR to update that doc with the info you just posted here for v3+ that would be awesome!
@keithdoggett Good call - I've just opened that PR. Thanks again for your help!
I have a rails app that is deployed to heroku. I'm running into the following error when trying to create a projected factory:
Somewhat confusing things,
RGeo::CoordSys::Proj4.supported?
returnstrue
.About the setup:
I more-or-less used these instructions. Summarized, I have an
Aptfile
that has the following content:I would expect this to satisfy the requirements of the gem? But I wouldn't be surprised if I were missing something obvious. Any guidance on getting this to work would be very much appreciated.