Closed joelmahoney closed 10 years ago
This was an order of operations problem: I transferred an old database to the app before installing heroku-geo-buildpack. If I create the postgis extension in the database, then deploy to install heroku-geo-buildpack, and then import the pg_dump, it works fine. Thanks!
Hi, I'm not sure if this is the right place for this and I'm happy to take it elsewhere, but I've tried everything to get this working and can't make it work.
Like @joelmahoney it seems to install okay, but RGeo can't see Geos from a console. I've even tried reimporting my database after the buildpack was intsalled and no dice.
± git push heroku master
...
-----> 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.1
Using gdal version: 1.10.0
Using proj version: 4.8.0
-----> Vendoring geo libraries done
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.0
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
...
Installing rgeo (0.3.20)
Installing rgeo-activerecord (1.0.0)
Installing activerecord-postgis-adapter (1.1.0)
Your bundle is complete!
± heroku run console
Loading production environment (Rails 4.1.0)
irb(main):001:0> RGeo::Geos.supported?
=> false
It does seem like Geos and Proj4 are getting installed, but that bundler is not compiling Rgeo with the correct paths to them.
± heroku run bash
~ $ ls vendor/
assets bundle gdal geos heroku proj ruby-2.1.0
And I can manually recompile the gem from the heroku bash prompt and get it working, but this change doesn't stick.
~ $ gem uninstall -i /app/vendor/bundle/ruby/2.1.0 rgeo
You have requested to uninstall the gem:
rgeo-0.3.20
rgeo-activerecord-1.0.0 depends on rgeo (~> 0.3.20)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN] y
Successfully uninstalled rgeo-0.3.20
~ $ gem install rgeo -- --with-geos-dir=/app/vendor/geos/3.4.1/
Fetching: rgeo-0.3.20.gem (100%)
Building native extensions with: '--with-geos-dir=/app/vendor/geos/3.4.1/'
This could take a while...
Successfully installed rgeo-0.3.20
Parsing documentation for rgeo-0.3.20
Installing ri documentation for rgeo-0.3.20
Done installing documentation for rgeo after 5 seconds
1 gem installed
~ $ irb
irb(main):001:0> require 'rgeo'
=> true
irb(main):002:0> RGeo::Geos.supported?
=> true
irb(main):003:0>
~ $ rails c
Could not find rgeo-0.3.20 in any of the sources
Run `bundle install` to install missing gems.
~ $ bundle
...
Installing rgeo (0.3.20)
Using rgeo-activerecord (1.0.0)
Using activerecord-postgis-adapter (1.1.0)
...
It was installed into ./vendor/bundle
~ $ rails c
Loading production environment (Rails 4.1.0)
irb(main):001:0> RGeo::Geos.supported?
=> true
~ $ exit
± heroku run console
Loading production environment (Rails 4.1.0)
irb(main):002:0> RGeo::Geos.supported?
=> false
I must be doing something wrong since it seems to work for everyone else... can anyone help me out? Thanks in advance.
Gemfile:
gem 'rgeo', '~> 0.3.20' # GEOS
gem 'activerecord-postgis-adapter', '~> 1.1.0'
rurabe, I ran into this problem and found that this fork fixed the problem in one of it's commits
I have the same issue as @rurabe and tried to use this forked version but I have still the same problem. RGeos is not supported.
Did anyone else manage to fix this one way or another?
I know this isn't super valuable, but wanted to ping this thread and see if anyone watching has had some luck fixing the issue? Above recommendations did not work for us.
After a long investigation, I believe this is due to a bug with rgeo ext compilation and libgeos 3.4.2, see: rgeo/rgeo#75
pinging to see if any fixes have been found
anyone?
Nope, couldn't fix it yet
On 30 jul. 2014, at 22:34, Mauricio Giraldo notifications@github.com wrote:
pinging to see if any fixes have been found
anyone?
— Reply to this email directly or view it on GitHub.
btw: finally worked for me. see: https://github.com/cyberdelia/heroku-geo-buildpack/issues/20#issuecomment-50666187
Still have this issue. Anyone found a solution?
I move some files, so that cedar-14
packages are chosen by default, this should provides a workaround (and eventually break for people stolen cedar-14). A better fix coming up after the holidays.
Hi @cyberdelia. I'm having trouble installing postgis + RGeo on Heroku. @deafbybeheading recommended this buildpack. It seems to install correctly but after install RGeo can't find GEOS. Any suggestions?