4

I have a Rails application where some features need the Free Pascal Compiler to work. Everything works fine localy, but I want to deploy this in Heroku now. There is any way to install the compiler there?

EDIT:

I tried these steps. As result, I created these two repos (fpc files, my buildpack). At the end, I set:

heroku config:add BUILDPACK_URL=https://github.com/rwehresmann/heroku-fpc-buildpack.git

As response I received:

Setting BUILDPACK_URL and restarting ⬢ farma-alg-reborn... done, v17
BUILDPACK_URL: https://github.com/rwehresmann/heroku-fpc-buildpack.git

I pushed to Heroku and didn't received any error, but the compiler was still not available in my application.

rwehresmann
  • 1,108
  • 2
  • 11
  • 27

1 Answers1

1

I don't know anything about heroku, but seems that you just extract some tar to some dir without any actual installation configuration.

  • no adding anything to path (needed?)
  • no configuring fpc (fpc.cfg contains paths that will need to be modified)
  • no management of permissions (there might be files that need executable permissions)
  • (no building of any kind, I assume the tar is a binary snaphot)

You also don't name the exact error that you get.

Marco van de Voort
  • 25,628
  • 5
  • 56
  • 89
  • My thar is, in fact, what was generated running a `install.sh` from the original file downloaded from FPC web site. I added it to my path in the `bin/release` file in the referenced buildpack from my question. I didn't mentionated, but I didn't have any errors running the buildpack in Heroku. It really seem that I'm missing something there, but I could not fix until now. – rwehresmann Mar 28 '17 at 12:02
  • What is the exact problem ? What command shows what output ? Note that if you don't restore to the same path as where you installed with install.sh, the fpc.cfg might need adaptation. The fpc.cfg is also not in the prefix, but in /etc/fpc.,cfg (global,admin installation) or ~/.fpc.cfg (mortal user installation) – Marco van de Voort Mar 28 '17 at 13:57
  • I never installed the fpc directly from the downloaded files of the web site. In my local environment I just used `apt-get`, but in heroku I have not this option. So I'm not completly sure if what I'm doing is correct. What I do in my script is: unpack the generated files generated by the installation script in the path `vendor/fpc`, and add to path `$PATH:/app/vendor/fpc/bin`. – rwehresmann Mar 29 '17 at 11:22
  • The exact problem is that doing only that, I still cannot using the compiler. I checked now, and I could not find this`fpc.cfg` file (I tested also running the installation script directly in Heroku). I don't know, certanly extra configurations are needed, but the FPC documentation isn't particulary helpful in this case. – rwehresmann Mar 29 '17 at 11:22
  • BUT WHAT HAPPENS IF YOU TRY TO USE THE COMPILER? WHAT IS THE MESSAGE? And yes, you will need a fpc.cfg. It should be in $prefix/etc, /etc or as .fpc.cfg (leading dot) in your homedir – Marco van de Voort Mar 29 '17 at 11:46
  • Then something goes wrong with your PATH. So it is purely heroku then. – Marco van de Voort Mar 29 '17 at 12:44