BlueTeaLondon / heroku-buildpack-libreoffice-for-heroku-18

Other
16 stars 28 forks source link

Compiled slug size is too large #22

Open otaviocorrea opened 1 year ago

otaviocorrea commented 1 year ago

I use a Rails app with a 367mb slug on Heroku, when I add the buildpack as reported in the Readme, I get an error in the Slug size, which is almost 600mb too much and Heroku only supports 500mb, even if I do a separate installation or buildpack would still cross the platform limit.

My Aptfile

libreoffice
libxfixes3
libxinerama-dev
libxinerama1
libxdamage1
http://ftp.us.debian.org/debian/pool/main/libg/libglu/libglu1-mesa-dev_9.0.2-1.1_i386.deb

My Buildpacks

1. heroku/ruby
2. heroku-community/apt
3. https://github.com/BlueTeaLondon/heroku-buildpack-libreoffice-for-heroku-18.git

Error

remote: -----> Compressing...
remote:  !     Compiled slug size: 1001.1M is too large (max is 500M).
remote:  !     See: http://devcenter.heroku.com/articles/slug-size
remote: 
remote:  !     Push failed
vesatoivonen commented 1 year ago

You don't need libreoffice in Aptfile since this buildpack is going to install AppImage version. If removing that doesn't help and you can't slim down your rails app then you might be out of luck.

otaviocorrea commented 1 year ago

You don't need libreoffice in Aptfile since this buildpack is going to install AppImage version. If removing that doesn't help and you can't slim down your rails app then you might be out of luck.

I did that, the build passes and everything is fine, but I get the following error while running my code

IOError: Can't find LibreOffice or OpenOffice executable.
otaviocorrea commented 1 year ago

@vesatoivonen I got this error when I try to retrieve through the OFFICE_PATH Errno::EACCES: Permission denied - /app/vendor/libreoffice/opt/libreoffice7.3

vesatoivonen commented 1 year ago

Try running soffice --version on your dyno. It should be available if the buildpack is installed correctly and you might need to configure your app accordingly.

otaviocorrea commented 1 year ago

Try running soffice --version on your dyno. It should be available if the buildpack is installed correctly and you might need to configure your app accordingly.

@vesatoivonen the soffice --version command worked, but the error persisted, I researched a little and found that I needed to add the bin to $PATH, I created a PR(https://github.com/BlueTeaLondon/heroku-buildpack-libreoffice-for-heroku-18/pull/23) to solve this, I already tested it in my application and it solved the problem, If possible, I would like you to accept my code in https://github.com/BlueTeaLondon/heroku-buildpack-libreoffice-for-heroku-18/pull/23.