Created
February 8, 2018 17:47
-
-
Save joeybeninghove/10d3dac869bfd3dae499f25eec50f6e5 to your computer and use it in GitHub Desktop.
Flywheel Local + Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey Joey, | |
I’ve been looking into this a while and I’ve run into some blockers so it’s only half of a solution for now. | |
Here’s what you can do: | |
You need the IP that every container will see your computer as (what’s traditional 127.0.0.1). See IP of HOST available within site container? for instructions on how to get that. It’s as simple as running one command in Terminal. | |
Open Local and right-click on the site you want to connect to your Rails app | |
Click “Open Site SSH” | |
Enter nano /etc/hosts | |
Add a new hosts entry for the Rails app. It should look something like: | |
10.0.2.2 my-local-rails-app.localhost | |
Once you do that, you should be good. | |
The one major caveat is the fact that this will not persist the next time the site is restarted in Local. We’d like to add the ability to run scripts on certain site events like stop, start, restart, etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment