lc0815
hello from a real frustrated newbe…
I’m reading this article Full-Stack React With Phoenix (Chapter 3 | Introduction to Phoenix) by michael mangialardi from the medium library. in it he’s adding a new Hello controller and I follow the to the letter on all fo the files he creates but I keep getting the error: Phoenix.Router.NoRouteError at GET /hello/phoenix
no route found for GET /hello/phoenix (HelloPhoenixWeb.Router)
and the only thing that is different is he is using version 1.3 of phoenix and I’m using the latest version.
for something this simple both version should work… but alas no matter what I try, it DOES NOT WORK FOR me…
Trending in Chat/Questions
Hey folks, I’ve been using Elixir for over a couple of years (phx, ecto, broadway, oban).
For this kind of work you do not tend, in my e...
New
Hi, I’m Dheeraj Sudan from the UK. I’m a software developer and also run a business with my wife Meenu Hinduja. I’m interested in getting...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
NobbZ
How does your
routes.exlook like? What is the output ofmix phx.routes?lc0815
mix phx.routes output:
Returning_from_des>mix phx.routes
page_path GET / HelloPhoenixWeb.PageController :index
hello_path GET /hello:data HelloPhoenixWeb.HelloController :message
live_dashboard_path GET /dashboard Phoenix.LiveView.Plug :home
live_dashboard_path GET /dashboard/:page Phoenix.LiveView.Plug :page
live_dashboard_path GET /dashboard/:node/:page Phoenix.LiveView.Plug :page
websocket WS /live/websocket Phoenix.LiveView.Socket
longpoll GET /live/longpoll Phoenix.LiveView.Socket
longpoll POST /live/longpoll Phoenix.LiveView.Socket
websocket WS /socket/websocket HelloPhoenixWeb.UserSocket
thank you for your reply
lc0815
route.ex content:
defmodule HelloPhoenixWeb.Router do
use HelloPhoenixWeb, :router
pipeline :browser do
end
pipeline :api do
end
scope “/”, HelloPhoenixWeb do
end
if Mix.env() in [:dev, :test] do
end
end
kokolegorille
Can You provide the lib/hello_phoenix_web/controllers/hello_controller.ex?
lc0815
here it is:
t0t0
I don’t know if it is some kind of typo but an important
/is missing here between/helloand:datalc0815
now I get this… after the / was included:
FunctionClauseError at GET /hello/phoenix
no function clause matching in Phoenix.Controller.render/3
t0t0
Phoenix.Controller.render/3 expects a Keyword or a Map as assigns, not an atom.
So:
render conn, "hello.html", data: data(Keyword), for example, like given in the tutorial you followkokolegorille
As mentionned, You need to add the /
It should be
The third argument should be a Keyword.
Well, @t0t0 get it right before koko
lc0815
thank you, that did it…
I missed the / between the hello and the :data, so I started making changes to see what worked making things worse, now I can continue with my article. thanks again, great job… this really helps…
