heroku-buildpack-elixir icon indicating copy to clipboard operation
heroku-buildpack-elixir copied to clipboard

erl not available in Heroku CI debug shell

Open jbescoyez opened this issue 7 years ago • 6 comments

To reproduce

  • git clone https://github.com/HashNuke/heroku-buildpack-elixir-test.git
  • cd heroku-buildpack-elixir-test
  • Add the following app.json file:
{
  "name": "buildpack-test",
  "scripts": {},
  "env": {},
  "formation": {},
  "addons": [
    {
      "plan": "heroku-postgresql"
    }
  ],
  "buildpacks": [
    { "url": "https://github.com/HashNuke/heroku-buildpack-elixir.git" }
  ]
}
  • git add app.json
  • git 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 master should 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

jbescoyez avatar Dec 30 '17 22:12 jbescoyez

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)

jherdman avatar Mar 23 '18 21:03 jherdman

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

jherdman avatar Mar 23 '18 21:03 jherdman

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

juanperi avatar Aug 27 '18 12:08 juanperi

@epilgrim were you able to find a resolution to this? I am having the same issue.

venkatd avatar Oct 09 '18 01:10 venkatd

Resolved my issue see #131 for more details

venkatd avatar Oct 09 '18 04:10 venkatd

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

mukulchourasia24 avatar Jul 31 '20 06:07 mukulchourasia24