Heroku buildpack config file not found, even though it's in the project root

I’m trying to use a custom elixir_buildpack.config. I placed it into the root directory as it is written in the readme and commit the file yet, when I push to heroku it can’t seem to find the file

project $ tree -L 1
├── _build
├── config
├── deps
├── elixir_buildpack.config
├── lib
├── mix.exs
├── mix.lock
├── priv
├── Procfile
├── README.md
└── test

6 directories, 5 files
project $ git ls-files --error-unmatch elixir_buildpack.config
Did I misunderstand something from the readme?

Copied from

What makes you think that it isn’t being found? Are you getting an error message? Are the settings not taking effect? Maybe it’s related to the contents of the elixir_buildpack.config, what do you currently have in there?

Well, the output of the buildpack itself says that it can’t find the file, so I don’t think it’s related to the contents.
remote: Compressing source files… done.
remote: Building source:
remote: -----> Elixir app detected
remote: -----> Checking Erlang and Elixir versions
remote: WARNING: elixir_buildpack.config wasn’t found in the app
remote: Using default config from Elixir buildpack
remote: Will use the following versions:
remote: * Stack heroku-18
remote: * Erlang 20.1
remote: * Elixir 1.5.0

But just to be sure, here’s my elixir_buildpack.config:


Hmmm, does heroku-buildpack-elixir support the heroku-18 stack? We’re still using heroku-16. Maybe something changed in how the $build_path should be calculated.

You could printout the value of $custom_config_file in https://github.com/HashNuke/heroku-buildpack-elixir/blob/651bb3d24e9538e158858591499bbcb166ebbb94/lib/misc_funcs.sh#L27

Made a quick fork and added a print statement.

remote: -----> Checking Erlang and Elixir versions
remote: /tmp/build_1aeaca44df7fc6184903b757f1765613/elixir_buildpack.config
remote:        WARNING: elixir_buildpack.config wasn't found in the app

Thank you for your assistance I was finally able to find out what the issue was. Turns out that the config file was always there, but just not on the correct git branch :sweat_smile:


Haha, that would do it!

Can you please explain what the problem is? I am facing a similar issue

@shijith.k I’m not sure if this is still relevant to you or not but I ran into the same issue today. Awlexus’s catch about the branch pointed me in the right direction. I was on a branch heroku-setup and had added the buildpack config file while on that branch. I ran git push heroku master which caused the failure. I needed to specify that I was pushing my local heroku-setup branch to the heroku remote’s master branch. In other words, I need to run git push heroku heroku-setup:master. Hope that helps if it’s still relevant.