Phoenix: `mix archive.install hex phx_new 1.4.0` fails because the ecto repo path is on Chris' hard drive.

Created on 25 Oct 2018  路  2Comments  路  Source: phoenixframework/phoenix

Steps to reproduce.

From any computer that doesn't belong to @chrismccord run:

mix archive.install hex phx_new 1.4.0-rc.2

Output

== Compilation error in file lib/phx_new/ecto.ex ==
** (File.Error) could not read file "/Users/chris/oss/phoenix/installer/templates/phx_ecto/repo.ex": no such file or directory
    (elixir) lib/file.ex:319: File.read!/1
    lib/phx_new/generator.ex:30: anonymous fn/4 in Phx.New.Generator."MACRO-__before_compile__"/2
    (elixir) lib/enum.ex:1925: Enum."-reduce/3-lists^foldl/2-0-"/3
    lib/phx_new/generator.ex:26: anonymous fn/3 in Phx.New.Generator."MACRO-__before_compile__"/2
    (elixir) lib/enum.ex:1925: Enum."-reduce/3-lists^foldl/2-0-"/3
    expanding macro: Phx.New.Generator.__before_compile__/1
    lib/phx_new/ecto.ex:1: Phx.New.Ecto (module)

Expected Results

It should succeed.

Workarounds

Change your name to Chris and update your computer login info.

Most helpful comment

This is a big in Elixir that will be fixed in the next elixir release. The fix is to uninstall the archive before installing:

$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.4.0-rc.2

Note you need to provide the -rc.2 as 1.4.0 isn鈥檛 out yet. Thanks!

All 2 comments

This is a big in Elixir that will be fixed in the next elixir release. The fix is to uninstall the archive before installing:

$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.4.0-rc.2

Note you need to provide the -rc.2 as 1.4.0 isn鈥檛 out yet. Thanks!

馃憤

Was this page helpful?
0 / 5 - 0 ratings