Skip to content

Rails cannot load resources on device connected to local machine via wifi #797

@a-barbieri

Description

@a-barbieri

I'm using Rails 5.1.4 with the Webpacker 3.0.1 configuration that is now by default integrated in Rails. I've followed this article "Rails 5.1 loves Javascript" to get me on the right track.

So far so good. If run rails s on a shell and ./bin/webpack-dev-server I can work on the application locally on my desktop.

The issue appears when I try to debug on iphone via my local wifi. The phone can connect to the local machine via port 3000 and browse the entire application, but apparently it cannot find 0.0.0.0:8080 server and therefore the webpack bundle. Infact it throws this error:

Failed to load resources: cannot connect to server http://0.0.0.0:8080/packs/application.js

What am I missing?

I've posted a issue on SuperUser as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions