Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - 6.2 Creating a new Phoenix application pg 109 #3

Open
rishinair-27 opened this issue Jun 1, 2019 · 8 comments
Open

Bug - 6.2 Creating a new Phoenix application pg 109 #3

rishinair-27 opened this issue Jun 1, 2019 · 8 comments
Assignees
Labels

Comments

@rishinair-27
Copy link

Hi,

I'm using the latest Phoenix v1.4.6

The command mix phx.new.web auction_web --no-ecto. does not work.

When i run the mix.server command, after running above, this is what i get ---

$ mix phx.server
Compiling 11 files (.ex)
Generated auction_web app

23:48:11.383 [info] Access AuctionWeb.Endpoint at http://localhost

And it just hangs there.

I'm not sure whether this is a bug with the Phoenix framework itself.

################################################################
Instead i had to use the mix phx.new command to get the web app/phoenix working.

@nshoes
Copy link

nshoes commented Jun 3, 2019

Ran into this myself! Validated that running mix phx.new instead of mix phx.new.web solved it.

@geolessel
Copy link
Contributor

geolessel commented Jun 3, 2019

Hmm, I'm seeing this as well with the new update. I validated it worked in Phoenix 1.4.2 through Phoenix 1.4.3. I'll have to do some digging as to why this no longer works. It might be a bug in Phoenix itself.

@rishinair-27
Copy link
Author

@geolessel the config file generated with .web is totally different than what you have listed in the repo. I think that should be the right place to start.

@geolessel geolessel self-assigned this Jun 3, 2019
@geolessel geolessel added the bug label Jun 3, 2019
@furoshikidev
Copy link

Cross posted from: https://elixirforum.com/t/mix-phx-server-has-weird-output-does-not-start-on-port-4000/22887/11

With Elixir 1.8.1 and Phoenix v1.4.6

$ mix phx.new.web auction_web --no-ecto

Is producing a ../apps/auction_web/ directory with no /config:

.gitignore
README.md
assets
lib
mix.exs
priv
test

But looking at the github repository for the book ( https://github.com/PhoenixInAction/phoenix-in-action/tree/master/ch06/auction_umbrella/apps/auction_web ) it looks like it is supposed to be there.

Downgraded to phx 1.4.2 (which is used in the book), deleted ../apps/auction_web/ then ran $ mix phx.new.web auction_web --no-ecto again.

Now there is a ../apps/auction_web/config directory and mix phx.server works as expected and is using port 4000.

$ mix phx.server

14:47:07.837 [info] Running AuctionWeb.Endpoint with cowboy 2.6.3 at 0.0.0.0:4000 (http)

14:47:07.845 [info] Access AuctionWeb.Endpoint at http://localhost:4000

Looks like something changed or broke between 1.4.2 and 1.4.6.

@psantos10
Copy link

open config/config.exs and at the end add :

import_config "#{Mix.env()}.exs"

This bug was already fixed here: phoenixframework/phoenix@fb3c923

@rishinair-27
Copy link
Author

Thanks psantos10

@geolessel
Copy link
Contributor

Thanks everyone for the reports and especially @psantos10 who opened the Phoenix issue. I'm going to leave this issue open until the fix makes it into a release.

@zano-aa
Copy link

zano-aa commented Oct 27, 2020

I don't understand how this line fixed your issue ! It just does not for me
Does anyone got the same issue and that line write down in the config/config.exs but still not working ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants