Abdul Wahab

Joined

60 Experience
0 Lessons Completed
0 Questions Solved

Activity

Thank you, Alex, but I have already tried the approach you mentioned. I also turned off the firewall on my host machine to check if it was blocking the incoming requests. However, I think the issue might be related to the DevContainers setup through WSL 2 and Ubuntu. Do you have any suggestions on troubleshooting this further?

I’m working with a Ruby on Rails application inside a DevContainer, and I’m trying to access the Rails server running on my localhost from other devices on the same private network. I’ve already tried running the Rails server with the command rails s -b 0.0.0.0, but when I try to access the application from the browser on a second device, it’s not working.

Here are some details about my setup:

  • I’m using DevContainers for my Rails environment.
  • I’ve exposed the necessary container ports to localhost, but still cannot reach the server from another device.
  • The application works fine when accessed from the host machine (the one running the container).

Can anyone suggest what might be causing this issue and how I can access my Rails app from other devices within the same network?