heroku-buildpack-elixir
heroku-buildpack-elixir copied to clipboard
erl not available in Heroku CI debug shell
To reproduce
git clone https://github.com/HashNuke/heroku-buildpack-elixir-test.gitcd heroku-buildpack-elixir-test- Add the following
app.jsonfile:
{
"name": "buildpack-test",
"scripts": {},
"env": {},
"formation": {},
"addons": [
{
"plan": "heroku-postgresql"
}
],
"buildpacks": [
{ "url": "https://github.com/HashNuke/heroku-buildpack-elixir.git" }
]
}
git add app.jsongit commit -m "Add app.json"heroku create --buildpack "https://github.com/HashNuke/heroku-buildpack-elixir.git"git push heroku master(not sure if needed)- Create a Github repo and associate it to the CI of your new Heroku app.
git push origin mastershould trigger the test runner.heroku ci:debug --pipeline [pipeline-name]- In the remote prompt:
erl
Current behavior
bash: erl: command not found
Expected behavior
- Erlang shell should start
I can confirm this on a greenfield elixir project:
Counting objects: 594, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (557/557), done.
Writing objects: 100% (594/594), 115.68 KiB | 3.04 MiB/s, done.
Total 594 (delta 299), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Elixir app detected
remote: -----> Checking Erlang and Elixir versions
remote: Will use the following versions:
remote: * Stack heroku-16
remote: * Erlang 19
remote: * Elixir 1.6.4
remote: -----> Will export the following config vars:
remote: * MIX_ENV=prod
remote: -----> Stack changed, will rebuild
remote: -----> Cleaning all cache to force rebuilds
remote: -----> Fetching Erlang 19
remote: -----> Installing Erlang 19 (changed)
remote:
remote: gzip: stdin: not in gzip format
remote: tar: Child returned status 1
remote: tar: Error is not recoverable: exiting now
remote: /app/tmp/buildpacks/7dbb5567c3a8b869f9516cd869ebf95082d7cf78f12fea9cba8fad1e1923c580f31b53ba792ed7279cc47894e95fe878ef82661603023bf1f6a023e7c7953587/lib/erlang_funcs.sh: line 37: /app/tmp/cache/erlang/Install: No such file or directory
remote: -----> Fetching Elixir v1.6.4 for OTP 19
remote: -----> Installing Elixir v1.6.4 (changed)
remote: -----> Installing Hex
remote: /tmp/build_d73acc2001107651557696222e126b57/.platform_tools/elixir/bin/elixir: 127: exec: erl: not found
remote: -----> Installing rebar
remote: /tmp/build_d73acc2001107651557696222e126b57/.platform_tools/elixir/bin/elixir: 127: exec: erl: not found
remote: -----> Fetching app dependencies with mix
remote: /tmp/build_d73acc2001107651557696222e126b57/.platform_tools/elixir/bin/elixir: 127: exec: erl: not found
remote: ! Push rejected, failed to compile Elixir app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to [REDACTED].
remote:
To https://git.heroku.com/[REDACTED].git
! [remote rejected] master -> master (pre-receive hook declined)
Apologies, my above comment has been resolved. I did what was suggested here and I was okay afterward: https://github.com/HashNuke/heroku-buildpack-elixir/issues/119#issuecomment-323607982
I'm seeing the same error. I get
-----> Stack changed, will rebuild
-----> Fetching Erlang 21.0
-----> Installing Erlang 21.0 (changed)
cp: cannot copy a directory, '/tmp/cache818435934/erlang', into itself, '/app/.platform_tools/erlang/erlang'
and then
~ $ erl
bash: erl: command not found
inside platform_tools, erlang points to a non_existing path:
~/.platform_tools $ ls
elixir erlang
~/.platform_tools $ cd erlang
bash: cd: erlang: No such file or directory
~/.platform_tools $ ls -la
total 12
drwx------ 3 u15341 dyno 4096 Aug 27 12:24 .
drwx------ 13 u15341 dyno 4096 Aug 27 12:25 ..
drwx------ 5 u15341 dyno 4096 Aug 27 12:24 elixir
lrwxrwxrwx 1 u15341 dyno 26 Aug 27 12:24 erlang -> /tmp/cache504287164/erlang
@epilgrim were you able to find a resolution to this? I am having the same issue.
Resolved my issue see #131 for more details
I was also having the same issue i changed my version in elixir_builpack.config from
Erlang version
erlang_version=21 to
Erlang version
erlang_version=21.0 now its working