我将heroku-buildpack-r和 heroku-buildpack-ruby 与 heroku-buildpack-multi 配合使用。一切都正确安装,R 在本地工作。
# .buildpacks
https://github.com/heroku/heroku-buildpack-ruby.git
https://github.com/virtualstaticvoid/heroku-buildpack-r.git
根据this heroku post,YAML在bin/release中为buildpacks设置了环境:
cat <<EOF
---
config_vars:
PATH: /app/vendor/R/bin:bin:/usr/local/bin:/usr/bin:/bin
R_HOME: /app/vendor/R
R_INCLUDE: /app/vendor/R/lib64/R/include
EOF
这段代码似乎运行:
R 2.15.1 successfully installed
Using release configuration from last framework R:
---
config_vars:
PATH: /app/vendor/R/bin:bin:/usr/local/bin:/usr/bin:/bin
R_HOME: /app/vendor/R
R_INCLUDE: /app/vendor/R/lib64/R/include
但是,在推送完成后,路径未设置为此:
~ $ echo $PATH
/app/bin:/app/vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
我可以手动设置 PATHheroku config:set
似乎是唯一的解决方案。
为什么 buildpack 没有按照宣传的方式设置路径?