我试图在使用RGeo gem的Heroku上部署一个Rails应用程序(ruby 2.3.0,rails 4.2.6),但是我没有安装底层GEOS库这是RGeo宝石所依赖的(见https://github.com/rgeo/rgeo#dependencies)。在Heroku上安装GEOS
根据Heroku's own instructions,这应该可以通过使用heroku-geo-buildpack,但它不起作用。
ADD BUILDPACK到App:
$ 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
test依赖:
>>> require 'rgeo'
=> false
>>> RGeo::CoordSys::Proj4.supported?
=> true
>>> RGeo::Geos.supported?
=> false
你运行添加buildpack如文档说,语言之前buildpack?在添加buildpack之后,它说你应该使用“heroku buildpack”来构建它。 –
@AlexanderLuna是我详细说明了我的过程 – Yarin
试试这个链接,在heroku中安装GEOS:[安装GEOS](http://stackoverflow.com/questions/16893840/installing-geos-on-heroku-cedar) – vipin