An error occurred while pushing code to Gigalixir

I am trying to push code to Gigalixir. But I got an error. Could you give me some advice by looking log?

thanks.

log

C:\elixir_dev\gigalixir_nodb>git push gigalixir master
Enumerating objects: 558, done.
Counting objects: 100% (558/558), done.
Delta compression using up to 4 threads
Compressing objects: 100% (516/516), done.
Writing objects: 100% (558/558), 5.21 MiB | 1.08 MiB/s, done.
Total 558 (delta 60), reused 0 (delta 0)
remote: Setting environment variables.
remote: * LIBCLUSTER_KUBERNETES_SELECTOR
remote: * LIBCLUSTER_KUBERNETES_NODE_BASENAME
remote: * APP_NAME
remote: * SECRET_KEY_BASE
remote: * PORT
remote: * SOURCE_VERSION
remote: Cloning into 'curvy-secondhand-reindeer'...
remote: warning: You appear to have cloned an empty repository.
remote: done.
remote: Compiling code and generating slug.
remote: latest: Pulling from gigalixir-152404/herokuish
remote: Digest: sha256:01b2c78943f694bcb5e18d7305aa444fe8205007bd93c5b6ae4648a0c63a809a
remote: Status: Image is up to date for us.gcr.io/gigalixir-152404/herokuish:latest
remote: us.gcr.io/gigalixir-152404/herokuish:latest
remote:        ----->        Detecting assets directory
remote:        package.json found in assets directory
remote:        Elixir+Phoenix app detected
remote:        Detecting assets directory
remote:        package.json found in assets directory
remote: =====> Downloading Buildpack: https://github.com/gigalixir/gigalixir-buildpack-clean-cache.git
remote: =====> Detected Framework: Clean Cache
remote:        Not cleaning cache
remote: =====> Downloading Buildpack: https://github.com/HashNuke/heroku-buildpack-elixir.git
remote: =====> Detected Framework: Elixir
remote: -----> Will export the following config vars:
remote:        APP_NAME
remote:        LIBCLUSTER_KUBERNETES_NODE_BASENAME
remote:        LIBCLUSTER_KUBERNETES_SELECTOR
remote:        PORT
remote:        SECRET_KEY_BASE
remote:        SOURCE_VERSION
remote:        * MIX_ENV=prod
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 cedar-14
remote:        * Erlang 20.1
remote:        * Elixir 1.5.3
remote: -----> Using cached Erlang 20.1
remote: -----> Installing Erlang 20.1
remote:
remote: -----> Using cached Elixir v1.5.3
remote: -----> Installing Elixir v1.5.3
remote: -----> Installing Hex
remote:        * creating /app/.mix/archives/hex-0.20.1
remote: -----> Installing rebar
remote:        * creating /app/.mix/rebar
remote:        * creating /app/.mix/rebar3
remote: -----> Fetching app dependencies with mix
remote:        Resolving Hex dependencies...
remote:        Dependency resolution completed:
remote:        Unchanged:
remote:        cowboy 2.7.0
remote:        cowlib 2.8.0
remote:        gettext 0.17.4
remote:        jason 1.1.2
remote:        mime 1.3.1
remote:        phoenix 1.4.12
remote:        phoenix_html 2.13.3
remote:        phoenix_pubsub 1.1.2
remote:        plug 1.8.3
remote:        plug_cowboy 2.1.1
remote:        plug_crypto 1.0.0
remote:        ranch 1.7.1
remote:        telemetry 0.4.1
remote:        * Getting phoenix (Hex package)
remote:        * Getting phoenix_pubsub (Hex package)
remote:        * Getting phoenix_html (Hex package)
remote:        * Getting gettext (Hex package)
remote:        * Getting jason (Hex package)
remote:        * Getting plug_cowboy (Hex package)
remote:        * Getting cowboy (Hex package)
remote:        * Getting plug (Hex package)
remote:        * Getting mime (Hex package)
remote:        * Getting plug_crypto (Hex package)
remote:        * Getting cowlib (Hex package)
remote:        * Getting ranch (Hex package)
remote:        * Getting telemetry (Hex package)
remote: -----> Copying hex from /app/.mix/archives/hex-0.20.1
remote: -----> Compiling
remote: ==> gettext
remote: warning: the dependency :gettext requires Elixir "~> 1.6" but you are running on v1.5.3
remote:        Compiling 1 file (.yrl)
remote:        Compiling 1 file (.erl)
remote:        Compiling 20 files (.ex)
remote:
remote: == Compilation error in file lib/mix/tasks/compile.gettext.ex ==
remote:        ** (CompileError) lib/mix/tasks/compile.gettext.ex:2: module Mix.Task.Compiler is not loaded and could not be found
remote:        (elixir) expanding macro: Kernel.use/1
remote:        lib/mix/tasks/compile.gettext.ex:2: Mix.Tasks.Compile.Gettext (module)
remote: could not compile dependency :gettext, "mix compile" failed. You can recompile this dependency with "mix deps.compile gettext", update it with "mix deps.update gettext" or clean it with "mix deps.clean gettext"
remote: Command '[u'docker', u'run', u'--memory-reservation=512m', u'--rm', u'-e', u'GIGALIXIR_SHOULD_CLEAN_CACHE=False', u'-v', u'/tmp/tmpV0dez0/curvy-secondhand-reindeer:/tmp/app', u'-v', u'/tmp/gigalixir/cache/curvy-secondhand-reindeer/:/tmp/cache', u'-v', u'/tmp/tmpV0dez0/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/curvy-secondhand-reindeer.git
 ! [remote rejected] master -> master (pre-receive hook declined)

Downgrade gettext to a version that works with elixir 1.5 or upgrade elixir on your host.

1 Like

You can specify the elixir version on gigalixir to something higher. See
https://gigalixir.readthedocs.io/en/latest/main.html#how-do-i-specify-my-elixir-erlang-node-npm-etc-versions

Also, be sure you follow this guide which has a section on specifying versions.
https://gigalixir.readthedocs.io/en/latest/main.html#getting-started-guide

NobbZ

Thanks for the useful advice.
I was successful in pushing by downgrade gettext to the version that works with elixir 1.5.

Best regards.

jesse

Thanks for the useful advice.
Following your advice, I’ll try to specify elixir version using elixir_buildpack.config.
I’ll report this result as soon as possible.

Best regards.

jesse

Thanks!
I could push to gigalixir with version 1.9.1 using elixir_buildpack.config.
I understand that I could specify the elixir version on gigalixir using elixir_buildpack.config.
thank you!!!

Best regards.

1 Like