Rails Base is the base Rails application template used at Flatstack. It's based on Rails 6 and Ruby 2.7
.slim
templatesmailer.rb
- setup default hosts for mailer from configurationrequires.rb
- automatically requires everything in lib/ & lib/extensionsbin/setup
- setup required gems and migrate db if neededbin/quality
- runs rubocop, brakeman, rails_best_practices and bundle-audit for the appbin/test
- runs all tests and quality checksbin/server
- to run server locallySome gems have native extensions. You should have GCC installed on your development machine. Dependencies will be automatically installed via setup script.
phantomjs
- to run Javascript unit testsgraphviz
- to generate Entity-Relationship Diagramnode
- JavaScript runtimeClone application as new project with original repository named "rails-base".
git clone git://github.com/fs/rails-base.git --origin rails-base [MY-NEW-PROJECT]
Create your new repo on GitHub and push master into it. Make sure master branch is tracking origin repo.
git remote add origin git@github.com:[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git
git push -u origin master
Run setup script
bin/setup
Run test and quality suits to make sure all dependencies are satisfied and applications works correctly before making changes.
bin/test
Run app
bin/server
Update README
Do not forget to update application README.md
file with detailed information based on the
existing template.
mv doc/README_TEMPLATE.md README.md
# update README.md
git commit -am "Update README.md"
Out of the box Rails Base ready to be deployed to Heroku.com.
heroku create --addons=heroku-postgresql,sendgrid,newrelic,rollbar --remote staging rails-base-example
heroku config:add HOST="rails-base-example.herokuapp.com" MAILER_SENDER_ADDRESS="noreply@rails-base-example.herokuapp.com" NEW_RELIC_APP_NAME="Rails Base"
git push staging master
heroku run rake db:schema:load
heroku open
To be able to deploy to your custom server Cloud66.com recommended as a provisioning and deployment service.
Make sure to review and configure cloud66/manifest.yml
before deployment.
Rails Base is maintained by Timur Vafin. It was written by Flatstack with the help of our contributors.