Inspired by https://github.com/excid3/jumpstart. Customized to fits our needs.
Note: Requires Rails 5.2
Kickstart is a Rails template, so you pass it in as an option when creating a new app.
You'll need the following installed to run the template successfully:
- Ruby 2.5+
- bundler -
gem install bundler
- rails -
gem install rails
- Yarn -
brew install yarn
or Install Yarn
rails new myapp -d mysql -m https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb
Or if you have downloaded this repo, you can reference template.rb locally:
rails new myapp -d postgresql -m template.rb
We use the encrypted Rails Credentials for app_id and app_secrets when it comes to omniauth authentication. Edit them as so:
EDITOR=vim rails credentials:edit
Make sure your file follow this structure:
secret_key_base: [your-key]
development:
github:
app_id: something
app_secret: something
options:
scope: 'user:email'
whatever: true
production:
github:
app_id: something
app_secret: something
options:
scope: 'user:email'
whatever: true
With the environment, the service and the app_id/app_secret. If this is done correctly, you should see login links
for the services you have added to the encrypted credentials using EDITOR=vim rails credentials:edit
rails db:drop
spring stop
cd ..
rm -rf myapp