我正在尝试将一个使用RGeo gem的Rails应用程序(ruby 2.3.0,rails 4.2.6)部署到Heroku上,但我无法安装RGeo gem所依赖的底层GEOS库(请参见https://github.com/rgeo/rgeo#dependencies)。
根据Heroku自己的说明,可以通过使用heroku-geo-buildpack实现,但它没有起作用。 将BUILDPACK添加到应用程序中:
根据Heroku自己的说明,可以通过使用heroku-geo-buildpack实现,但它没有起作用。 将BUILDPACK添加到应用程序中:
$ heroku buildpacks:set https://github.com/cyberdelia/heroku-geo-buildpack.git
$ heroku buildpacks:add heroku/ruby
构建过程看起来不错:
remote: Building source:
remote:
remote: -----> geos/gdal/proj app detected
remote: Using geos version: 3.4.2
remote: Using gdal version: 1.11.1
remote: Using proj version: 4.8.0_1
remote: -----> Vendoring geo libraries done
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.3.0
测试依赖:
>>> require 'rgeo'
=> false
>>> RGeo::CoordSys::Proj4.supported?
=> true
>>> RGeo::Geos.supported?
=> false