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

WSL2 - Unable to access localhost:3000 from Windows browser #4365

Closed
cvkmohan opened this issue Aug 1, 2019 · 3 comments
Closed

WSL2 - Unable to access localhost:3000 from Windows browser #4365

cvkmohan opened this issue Aug 1, 2019 · 3 comments

Comments

@cvkmohan
Copy link

cvkmohan commented Aug 1, 2019

Please fill out the below information:

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Windows build 18945.
  • What's wrong / what should be happening instead:
    I have installed WSL2 using the guide https://docs.microsoft.com/en-us/windows/wsl/wsl2-install
    After installing, I have installed ruby and rails in the Linux local file system.
    The installation has visible speed change compared to wsl1 and went smoothly.
    Now, when I try rails s - It shows tcp:localhost:3000 has Puma server listening, but, when I type localhost:3000 in the Chrome browser in Windows, I get nothing.
    I tried rails -b 0.0.0.0 s also, to bind the server, still nothing happens.
@cvkmohan
Copy link
Author

cvkmohan commented Aug 1, 2019

Unsure what happened. I got 18950 build today. Once I have upgraded and reinstalled WSL2, now, when I tried rails -b=0.0.0.0, it started working.
WSL2 has an order of speed difference when compared to WSL1. Thanks for all the effort.

@cvkmohan cvkmohan closed this as completed Aug 1, 2019
@NEKN3X
Copy link

NEKN3X commented Sep 9, 2019

In my environment

wsl2 react server localhost;3000 is OK
I can open react page.

wsl2 rails server localhost:5000 is NG
I can't connect my rails API.

I am sorry I can't speak English well.

@craigloewen-msft
Copy link
Member

@NEKN3X please open a new issue detailing what build of Windows you are using and what problem you're running into and we'll help you out there! :)

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

No branches or pull requests

3 participants