Trouble setting elixir version when deploying to Gigalixir

Hello forum, I have been learning elixir for a few weeks and loving it, and am attempting to deploy an app to gigalixir. I followed the video tutorial (https://gigalixir.com/) and got everything working, but I wanted to simply change the elixir version. So I added an elixir_buildpack.config to the root folder, and tried using default file without modification at:

But the docker command errors out with exit code 1. If all I do is delete the file, it works fine. I am making sure I commit everything with every change I make. Don’t have any Heroku experience unfortunately.

Output:

Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 364 bytes | 182.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Setting environment variables.
remote: * LIBCLUSTER_KUBERNETES_SELECTOR
remote: * LIBCLUSTER_KUBERNETES_NODE_BASENAME
remote: * SECRET_KEY_BASE
remote: * PORT
remote: * SOURCE_VERSION
remote: Cloning into 'abandoned-mean-chrysomelid'...
remote: done.
remote: Compiling code and generating slug.
remote: latest: Pulling from gigalixir-152404/herokuish
remote: Digest: sha256:3d429483ee28e06acec8e70cf26aad98e054cdb854d8063c1f9f2594e5cbc594
remote: Status: Image is up to date for us.gcr.io/gigalixir-152404/herokuish:latest
-----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
       Detected buildpacks: multi elixir
-----> Multipack app detected
remote: ownloading Buildpack: https://github.com/gigalixir/gigalixir-buildpack-clean-cache.git
=====> Detected Framework: Clean Cache
       Not cleaning cache
remote: ownloading Buildpack: https://github.com/HashNuke/heroku-buildpack-elixir
=====> Detected Framework: Elixir
-----> Checking Erlang and Elixir versions
       Will use the following versions:
       * Stack cedar-14
remote:  Erlang 20.1
remote:  Elixir 1.5.3
-----> Will export the following config vars:
       LIBCLUSTER_KUBERNETES_NODE_BASENAME
       LIBCLUSTER_KUBERNETES_SELECTOR
       PORT
       SECRET_KEY_BASE
       SOURCE_VERSION
       * MIX_ENV=prod
remote: .tar.gz
remote: Command '[u'docker', u'run', u'--rm', u'-e', u'GIGALIXIR_SHOULD_CLEAN_CACHE=False', u'-v', u'/tmp/tmpU8WxUG/abandoned-mean-chrysomelid:/tmp/app', u'-v', u'/tmp/gigalixir/cache/abandoned-mean-chrysomelid/:/tmp/cache', u'-v', u'/tmp/tmpU8WxUG/env:/tmp/env', u'--env=USER=www-data', u'us.gcr.io/gigalixir-152404/herokuish:latest']' returned non-zero exit status 1
To https://git.gigalixir.com/abandoned-mean-chrysomelid.git/
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.gigalixir.com/abandoned-mean-chrysomelid.git/'

Try clearing the build cache (check the gigalixir docs for example).

This doesn’t seem to work. Also after doing all the git upgrades, I now have version 2.21.0. The gigalixir docs claimed you needed 2.9, maybe they meant 2.19… anyway this didn’t fix it.

I’m using Ubuntu on Windows, I’m getting the same problem on a native ubuntu machine though.

solved mine. Thanks to gigalixir Jesse S who replied my email

$ cat -v elixir_buildpack.config
erlang_version=22.1.8^M
elixir_version=1.9.1^M

the ^M is the culprit.
just need to rename the old file and create a new file:

$ tr -d '\r' < elixir_buildpack-old.config > elixir_buildpack.config     

same goes for phoenix_static_buildpack.config

1 Like