fs / rails-base

Skeleton for new Rails based projects.
http://www.flatstack.com/open-source/
198 stars 57 forks source link
rails ruby skeleton

Rails Base

Build Status

Rails Base is the base Rails application template used at Flatstack. It's based on Rails 6 and Ruby 2.7

Application Gems

Development Gems

Testing Gems

Initializers

Scripts

Getting Started

Prepare dependencies

Some gems have native extensions. You should have GCC installed on your development machine. Dependencies will be automatically installed via setup script.

Bootstrap application

  1. Clone 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]
  2. 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
  3. Run setup script

    bin/setup
  4. Run test and quality suits to make sure all dependencies are satisfied and applications works correctly before making changes.

    bin/test
  5. Run app

    bin/server
  6. 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"

Deployment

Heroku

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

Custom Server

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.

Credits

Rails Base is maintained by Timur Vafin. It was written by Flatstack with the help of our contributors.