This guide assumes you have completed the steps to create a new Rails app using the Shopify App gem found in the Usage section of the project's README.
Make your app available to the internet
Use Shopify App Bridge to embed your app in the Shopify Admin
Your local app needs to be accessible from the public Internet in order to install it on a Shopify store, to use the App Proxy Controller or receive webhooks.
Use a tunneling service like ngrok, Beeceptor, Mockbin, or Hookbin to make your development environment accessible to the internet.
For example with ngrok, run this command to set up a tunnel proxy to Rails' default port:
ngrok http 3000
See the Embed the app in Shopify section of Build a Shopify app with Rails, React, and App Bridge to learn more.
A basic example of using Shopify App Bridge is included in the install generator. An instance Shopify App Bridge is automatically initialized in shopify_app.js.
The flash_messages.js file converts Rails flash messages to App Bridge Toast actions automatically. By default, this library is included via unpkg in the embedded_app layout.
For more advanced uses it is recommended to install App Bridge via npm or yarn.