rails ngrok blocked host

To unblock the host for Rails ngrok, you can follow these steps:

  1. Install ngrok: Install ngrok by downloading it from the official website (https://ngrok.com/) or by using a package manager like Homebrew (for macOS) or Chocolatey (for Windows).

  2. Sign up for ngrok: Sign up for a free ngrok account on the ngrok website. This will give you an auth token that you will need to use ngrok.

  3. Set up authentication: Open a terminal and run the following command to authenticate ngrok with your account:

ngrok authtoken YOUR_AUTH_TOKEN

Replace YOUR_AUTH_TOKEN with the auth token you obtained from the ngrok website.

  1. Start ngrok: In your Rails application directory, open a terminal and run the following command to start ngrok:

ngrok http YOUR_PORT_NUMBER

Replace YOUR_PORT_NUMBER with the port number that your Rails application is running on.

  1. Check the ngrok URL: After starting ngrok, it will display a publicly accessible URL that you can use to access your local Rails application. Look for a line in the ngrok output that starts with "Forwarding". The URL will be listed next to it.

  2. Unblock the host: Open a browser and visit the ngrok URL. You may encounter a security warning, as ngrok uses self-signed SSL certificates. Click on the "Advanced" or "More Information" link and proceed to the ngrok URL.

If you're using Google Chrome, you can also type "thisisunsafe" on the security warning page to bypass it.

  1. Access your Rails application: Now you should be able to access your local Rails application through the ngrok URL without any blocked host warnings.

Note: Keep in mind that ngrok is primarily intended for local development and testing purposes. It is not recommended to use ngrok in a production environment.