Relative path trouble
mattfordham opened this issue · 1 comments
When using the cedar-14 buildpack, I was able to run scripts like so on Heroku: Rscript r/init.r
. Since upgrading to heroku-16, this not longer works. I am now needing to run the same script with an absolute path like so: Rscript /app/r/init.r
.
This wouldn't be such a big deal, except all of the dependent R scripts are not loading as they are referenced relatively. I'm obviously trying to avoid changing all of the paths to absolute to ensure portability between environments. Any ideas what is up?
Hi @mattfordham
Yeah, the heroku-16 version of the buildpack uses a chroot to run R (for various reasons), so your code would need to run inside the chroot to work in the way you want. E.g. For relative paths to work in a portable way.
I'd recommend that you rather use the heroku-docker-r version instead, so you can have the control and portability you need.
Hope that helps.