-
Create the app:
- rails new -d postgresql(heroku database)
-
Create the app in shopify partner dashboard
- Uri: https://example.herokuapp.com
- remember the https or http or it will have he redirect_uri error
- Click create app
- Uri: https://example.herokuapp.com
-
Go to the app info
- Change the redirect uri to: https://example.herokuapp.com/auth/shopify/callback
-
Go to Extensions
- Enable "Embed in Shopify admin" if you want your app to run in Shopify web page
-
In the Gemfile
- Insert the shopify app gem
- gem 'shopify_app' or
- gem 'shopify_app', '7.2.9'
- bundle install
- Insert the shopify app gem
-
Generate shopify app
- rails generate shopify_app --api_key <your_api_key> --secret <your_app_secret> ex: rails generate shopify_app --api_key asdv --secret xyz
-
Delete favicon.ico
- In app/views/home/index => delete the line Icon:....'favicon.ico'(Don't know why heroku can not redirect if you have this line)
- If you want your app not to run in embedded app on shopify go to: app/views/layouts/embedded_app.html.erb change forceRedirect: true => forceRedirect: false
-
Change version of the database
- In db/migrate/...._create_shops.rb => change this line CreateShops < ActiveRecord::Migration into CreateShops < ActiveRecord::Migration[5.0]
- this line will let you migrate the database in heroku
- In db/migrate/...._create_shops.rb => change this line CreateShops < ActiveRecord::Migration into CreateShops < ActiveRecord::Migration[5.0]
-
Push to Heroku(you can push to github first)
- git init
- git add .
- git commit -m "......"
- heroku create (then rename)
- git push heroku master
- heroku rake db:migrate(Important)
-
go to your heroku app and test
-
Notifications
You must be signed in to change notification settings - Fork 0
huylocit14054/shopify_test_app_success
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published