Chris Oliver 1b1af7d819 Fix webpacker for rails 5.2 | há 5 anos atrás | |
---|---|---|
app | há 5 anos atrás | |
config | há 6 anos atrás | |
lib | há 6 anos atrás | |
.foreman | há 5 anos atrás | |
.gitignore | há 6 anos atrás | |
CHANGELOG.md | há 5 anos atrás | |
LICENSE | há 6 anos atrás | |
Procfile | há 5 anos atrás | |
Procfile.dev | há 5 anos atrás | |
README.md | há 5 anos atrás | |
template.rb | há 5 anos atrás |
It's like Laravel Spark, for Rails. All your Rails apps should start off with a bunch of great defaults.
Note: Requires Rails 5.2 or higher
Jumpstart 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:
gem install bundler
gem install rails
brew install yarn
or Install Yarngem install foreman
- helps run all your
processes in developmentrails new myapp -d postgresql -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
To run your app, use foreman start
.
This will run Procfile.dev
via foreman start -f Procfile.dev
as configured by the .foreman
file and will launch the development processes rails server
, sidekiq
, and webpack-dev-server
processes. You can also run them in separate terminals manually if you prefer.
A separate Procfile
is generated for deploying to production.
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