我試圖在使用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