cyberdelia / heroku-geo-buildpack

Geo libraries for Heroku
https://github.com/heroku/heroku-geo-buildpack
114 stars 135 forks source link

Geos not found anymore after new version Geos 3.4.2 #18

Closed solenema closed 10 years ago

solenema commented 10 years ago

I encounter the following issue since June 30th. I have a rails app hosted on heroku. I deployed with this buildpack for while. Since June 30th, Geos is not supported anymore after a deploy. When I deployed and check on the console if Geos is supported (RGeo::Geos.supported) it returns "false".

I looked at the Environment variables => a new version of Geos (3.4.2) is now used: GEOS_LIBRARY_PATH=/app/vendor/geos/3.4.2/lib

while on the previous deployed version it was: GEOS_LIBRARY_PATH=/app/vendor/geos/3.4.1/lib

I don't know it it is related but it is the only difference I found.

cyberdelia commented 10 years ago

Sorry, I updated geos, but that don't force gem recompilation :| Looking for a way to force it from the buildpack.

In the meantime, you can use: https://github.com/heroku/heroku-repo

harmdewit commented 10 years ago

Seems like this buildpack should force recompilation: https://github.com/wikyd/heroku-buildpack-recompile-gems.

It seems to work well

-----> Removing .DS_Store files
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/cyberdelia/heroku-geo-buildpack.git
=====> Detected Framework: geos/gdal/proj
       Using geos version: 3.4.2
       Using gdal version: 1.11.0
       Using proj version: 4.8.0
-----> Vendoring geo libraries done
=====> Downloading Buildpack: https://github.com/wikyd/heroku-buildpack-recompile-gems
=====> Detected Framework: Recompile Gems
...
-----> Found a .recompile_gems file
       Removing gem /app/tmp/cache/vendor/bundle/ruby/2.1.0/gems/rgeo-0.3.20
       Removing gem /app/tmp/cache/vendor/bundle/ruby/2.1.0/specifications/rgeo-0.3.20.gemspec
...
       Installing rgeo 0.3.20
       Using rgeo-geojson 0.3.1
...

However after installing geos is still not supported :/

irb(main):002:0> RGeo::Geos.supported?
=> false
harmdewit commented 10 years ago

Any idea how to fix this? I've tried several versions, other PATHS, using environment variables but they all do not work during the bundle compilation. If i manually compile on the server using heroku bash it works fine as in this thread https://github.com/cyberdelia/heroku-geo-buildpack/issues/12#issuecomment-43234167, but on every bundle compilation bundler doesn't seem to detect the libraries.

solenema commented 10 years ago

I fixed it by doing so:

It is a temporary solution as I'd like to be able to upgrade to 4.3.2 at some point.

harmdewit commented 10 years ago

I tried your buildpack @ https://github.com/Enquire/heroku-geo-buildpack, purged the cache, see Geos version 4.3.1 gets installed but RGeo::Geos.supported still returns false

solenema commented 10 years ago

Did you put this in the .buildpacks file of your project =>

https://github.com/Enquire/heroku-geo-buildpack.git https://github.com/heroku/heroku-buildpack-ruby.git

harmdewit commented 10 years ago

Yup, i had the ruby buildpack fixed at a version though. Tried again with a purge and the exact same buildpacks above but still the same result.

solenema commented 10 years ago

Sorry, you should reach out heroku support. I already let them know a few weeks ago but I haven't had any answers.

mgiraldo commented 10 years ago

did anyone here manage to solve this problem? @harmdewit @solenema ?

mgiraldo commented 10 years ago

btw: finally worked for me. see: https://github.com/cyberdelia/heroku-geo-buildpack/issues/20#issuecomment-50666187

harmdewit commented 10 years ago

Strange... I tried to get back at this today, tried something this afternoon with no success. Then I tried setting up a new blank rails project this evening, tried the exact same settings and suddenly it worked. Then i tried my original project again and it now also successfully compiled the gems :joy:!

I'm glad it finally worked but I have no idea why, did the geo libraries suddenly change?

cyberdelia commented 10 years ago

@harmdewit I rolled back to previous goes version after finding out there is a bug in the compilation step of the new rspec gem, but that was a few weeks ago.

harmdewit commented 10 years ago

Ah ok, guess i've done something wrong this afternoon. Thanks for helping :+1: :