500 Errors on Heroku with 2.4.0

I’m trying to run 2.4.0 on Heroku and am getting the following error:

2016-12-08T07:30:41.018958+00:00 heroku[router]: at=info method=GET path="/" host=zutalo.rs request_id=f06d929e-1da9-40f7-8882-837394b621ff fwd="96.250.198.95,173.245.52.222" dyno=web.1 connect=0ms service=7ms status=500 bytes=169
2016-12-08T07:30:40.957975+00:00 app[web.1]: [08-Dec-2016 07:30:40 UTC] PHP Warning:  include(/app/web/kirby/vendor/autoload.php): failed to open stream: No such file or directory in /app/web/kirby/bootstrap.php on line 7
2016-12-08T07:30:40.958245+00:00 app[web.1]: [08-Dec-2016 07:30:40 UTC] PHP Warning:  include(): Failed opening '/app/web/kirby/vendor/autoload.php' for inclusion (include_path='.:/app/.heroku/php/lib/php') in /app/web/kirby/bootstrap.php on line 7
2016-12-08T07:30:40.958535+00:00 app[web.1]: [08-Dec-2016 07:30:40 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function load() in /app/web/kirby/bootstrap.php:10
2016-12-08T07:30:40.958589+00:00 app[web.1]: #0 /app/web/index.php(6): require()
2016-12-08T07:30:40.958551+00:00 app[web.1]: Stack trace:
2016-12-08T07:30:40.958605+00:00 app[web.1]: #1 {main}
2016-12-08T07:30:40.958677+00:00 app[web.1]:   thrown in /app/web/kirby/bootstrap.php on line 10
2016-12-08T07:30:40.959421+00:00 app[web.1]: 10.97.202.144 - - [08/Dec/2016:07:30:40 +0000] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

I was able to get 2.3.2 working just fine, is anyone familiar with what changed in 2.4 in regards to the autoload file? Is there a new requirement that I’m missing?

Thanks for your help!

Oops - my mistake - didn’t notice that their default PHP boilerplate ignores all vendor folders. Problem solved!

How did you fix this?

Also seeing my content get deleted on saves.

Do you have write permissions on the filesystem? Please check your server logs.

Yeah, looks like I can’t write to the disk on Heroku. I am totally ok with that for now. More concerned that when I updated from 2.1 it would fail.

PHP Warning: include(/app/kirby/vendor/autoload.php): failed to open stream: No such file or directory in /app/kirby/bootstrap.php on line 7

Not sure how to fix this on Heroku. It works fine locally.

Does the vendor folder exist on the remote server? Note that the structure has changed from 2.1 to now, with the toolkit being included in the vendor folder. But then I don’t know why it works on localhost. Maybe some difference between your local stuff and what you deploy to Heroku?

D’oh!

My git ignore file was ignoring all vendor folders.

Fixed. Thanks for you patience and help!