Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update paths and file contents for Phoenix 1.8.0-rc.3 #61

@mtlynch

Description

@mtlynch

Thanks for writing up this guide! I'm trying to learn Elixir/Phoenix, so I appreciate the focus on simplicity.

It looks like the file paths for the Phoenix tutorial are no longer correct for 1.8.0-rc.3. It says that phx.new should generate a template at lib/demo_web/templates/page/index.html.eex, but Phoenix doesn't seem to generate that path.

Repro steps

Save this file as Dockerfile:

FROM elixir:1.18.3

RUN apt update && apt install -y tree

RUN mkdir /app
WORKDIR /app

RUN mix archive.install hex phx_new '1.8.0-rc.3' --force

RUN mix phx.new demo --no-ecto --install

Run the following command:

$ docker build -t demo . && docker run demo /bin/bash -c "mix phx.new --version && tre
e /app/demo/lib"
[...elided...]
Phoenix installer v1.8.0-rc.3
/app/demo/lib
├── demo
│   ├── application.ex
│   └── mailer.ex
├── demo.ex
├── demo_web
│   ├── components
│   │   ├── core_components.ex
│   │   ├── layouts
│   │   │   └── root.html.heex
│   │   └── layouts.ex
│   ├── controllers
│   │   ├── error_html.ex
│   │   ├── error_json.ex
│   │   ├── page_controller.ex
│   │   ├── page_html
│   │   │   └── home.html.heex
│   │   └── page_html.ex
│   ├── endpoint.ex
│   ├── gettext.ex
│   ├── router.ex
│   └── telemetry.ex
└── demo_web.ex

7 directories, 16 files

The actual template appears to be at lib/demo_web/controllers/page_html/home.html.heex

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions