1

I'm developing an app that is a combination of a Chrome extension and Rails backend (plus redis, solr and postgres). I've recently switched to developing on my nice home Windows rig instead of my macbook. The extension (running in a chrome browser on Windows) needs to be able to talk to the host (https://company.localhost) backed by the Rails server running in the WSL2 (localhost:3000).

The dependencies (redis, solr, postgres) are hosted as Docker containers and are reachable by the server (just regular ole rails s) without issue. I'm down to switch the server to be dockerized as well, if that helps out.

On Mac, there's a magic tool that handles all this (puma-dev), including the S part of HTTPS.

I'm not even sure where to begin with Windows & the WSL. Any pointers?

PS - I'm looking at puma-dev on the WSL, but there's indications that that might not pan out.

Update: Have puma-dev setup properly inside the WSL, so ping company.localhost resolves as expected.

Narfanator
  • 111
  • 4
  • 1
    Does your update solve the issue? I'm unclear on what your problem is. Can you show the problem by example and any errors? – Andy Shinn May 06 '20 at 18:26
  • The extension is getting a "connection refused" error. I think it's because the SSL part isn't working, or being bypassed through host resolution in Windows directly to 127.0.0.1 Still not sure. – Narfanator May 06 '20 at 22:11

1 Answers1

1

Here is what worked for me:

  1. Open windows hosts file c:\Windows\System32\Drivers\etc\hosts
  2. Add a binding for your puma domain to localhost 127.0.0.1 mysite.test
  3. Save and restart windows
Daniel
  • 11
  • 2