【发布时间】:2016-12-16 17:27:49
【问题描述】:
我正在尝试将 Rails 应用程序(ruby 2.3.0,rails 4.2.6)部署到使用 RGeo gem 的 Heroku,但我没有运气安装底层RGeo gem 所依赖的 GEOS 库(参见 https://github.com/rgeo/rgeo#dependencies)。
根据Heroku's own instructions,这应该可以通过使用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
【问题讨论】:
-
您是否按照文档中的说明在添加语言的 buildpack 之前运行了 buildpack?添加 buildpack 后,它说您应该使用“heroku buildpacks”构建它。
-
@AlexanderLuna 是的,我在上面详细说明了我的过程
-
试试这个链接,在heroku中安装GEOS:Install GEOS
标签: ruby-on-rails heroku geos rgeo