New Shopify Certification now available: Liquid Storefronts for Theme Developers

Shopify App Bridge Installation in Rails app

23 2 8


I am creating a Shopify app using Ruby on Rails. Actually, I want to use Shopify Toasts for my App. For this purpose, I am following this guide . 

But Unable to make it work when I check in the console everything looks fine then this error comes up.

Screenshot 2021-08-18 at 5.23.01 PM.png





If anyone had this issue please help me resolve this. I am creating a Ruby on Rails Shopify app not React. 

Host, shopOrigin everything I am providing like this:

var AppBridge = window['app-bridge'];
var actions = window['app-bridge'].actions;
var createApp = AppBridge.default;
var app = createApp({
apiKey: 'f558d070d3f8e1b0ba4c25cd633e3d6c',
shopOrigin: 'https://<%= Shop.last.shopify_domain%>',

var TitleBar = actions.TitleBar;
var Button = actions.Button;
var Redirect = actions.Redirect;
var breadcrumb = Button.create(app, { label: 'My breadcrumb' });
breadcrumb.subscribe(Button.Action.CLICK, function() {
app.dispatch(Redirect.toApp({ path: '/breadcrumb-link' }));

var titleBarOptions = {
title: 'My page title',
breadcrumbs: breadcrumb

var myTitleBar = TitleBar.create(app, titleBarOptions);
P.S: The above code is for creating button in navigation menu and this is also not working. 
Will be waiting for support, Thanks
Reply 1 (1)
Shopify Partner
7 0 1

I think you have to use host instead of shopOrigin in createApp.