Installing GEOS on heroku cedar

耗尽温柔 提交于 2020-01-05 03:50:25

问题


we have troubles in installing the GEOS library on heroku cedar stack.

We followed this guide: https://devcenter.spacialdb.com/Heroku.html and it didn't work.

We noticed that the path (/app/tmp/geos) stored in the provided geos binaries was wrong, so we built our own binaries with vulcan.

We changed parameters (BUNDLE_BUILD__RGEO) accordingly, but we weren't able to make it work.

We even hardcoded geos paths in our custom rgeo gem without any success

We also tried other buildscripts (https://github.com/roximity/heroku-buildpack-ruby-geos) but they are too old and it will be difficult to keep them up to date with heroku's one

We are using ruby 2.0.0-p195 and Rails 3.2.13


回答1:


I just created heroku-buildpack-rgeo-prep to address this problem.

This buildpack overwrites .bundle/config to set BUNDLE_BUILD__RGEO to the current build path. Unfortunately, you can't set BUNDLE_BUILD_RGEO=/app because your project is actually built somewhere like /tmp/build_1890cktlpat5d.

Hopefully, this buildpack will make it much less painful to use RGeo on Heroku.



来源:https://stackoverflow.com/questions/16893840/installing-geos-on-heroku-cedar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!