Using Pow
Pow is a minimum configuration Rack server for use on macOS.
This makes the applications we develop in Rails and Rack as transparent as possible. Its use simplifies the operation and settings such as editing /etc/host files or installing preference panels.
To learn more about the project the link is as follows: http://pow.cx/
Installation is quite simple, just open the terminal and run the following command:
curl get.pow.cx | sh
Once installed it is necessary to restart the terminal to ensure that the changes were updated correctly.
Next thing we need to do is make a symbolic link to the Ruby on Rails application directory with the domain name we need to use.
The steps to perform these tasks are as follows:
cd ~/.pow ln -s /path/to/myapp mycustomdomain
After performing these steps, we can access our browser to the address we define in our case mycustomdomain, only we will add at the end .dev remaining as the domain to use mycustomdomain.dev.
If you want to delete any of the created domains, just execute the following command in the terminal:
rm mycustomdomain