Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Skeleton for new Rails based projects.
Ruby CSS HTML Other

Merge pull request #356 from ruslankhaertdinov/replace-rails12-factor…


Replace rails12 factor with rails stdout logging 337
latest commit a2b5dd320b
@timurvafin timurvafin authored
Failed to load latest commit information.
app Add rack-mini-profiler
bin Implement dynamic definition for the db name
config Add rack-mini-profiler
db Upgrade Ruby to 2.2.2 and Rils to 4.2.1
doc Update Ruby to 2.2.3
lib Add gzipping for assets
public Move assets to app directory
spec Add Faker to generate more real-world factories.
.csscomb.json add csscomb configuration
.env.example [#337] Replace rails_12factor with rails_stdout_logging
.erdconfig Add Rails ERD for generating entity-relationship diagrams
.gitignore Switch from Thin to Puma
.pryrc.example add gem pry-remote
.rspec Extract rails-related config to rails_helper, add 'maintain_test_sche…
.ruby-version Update Ruby to 2.2.3
Brewfile Add graphviz to Brewfile [#337] Replace rails_12factor with rails_stdout_logging more detailed release instructions
Gemfile [#337] Replace rails_12factor with rails_stdout_logging
Gemfile.lock [#337] Replace rails_12factor with rails_stdout_logging
Procfile Switch from Thin to Puma Switch from Thin to Puma
Rakefile force double quotes in ruby
app.json Add app.json to enable Heroku Review Apps Move CanonicalHost and Auth::Basic configuration to initializers

Rails Base

Build Status Test Coverage Code Climate

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

Application Gems

Development Gems

  • Puma as Rails web server
  • Foreman for managing development stack with Procfile
  • Letter Opener for opening mail in the browser instead of sending it
  • Bullet for detecting N+1 queries and unused eager loading
  • Rubocop and Rubocop-Rspec for reporting violations of the Ruby style guide
  • Rails Best Practices for checking the code quality
  • Brakeman for checking application for common security vulnerabilities
  • Pry Rails for interactively exploring objects
  • Bundler Audit for scanning the Gemfile for insecure dependencies based on published CVEs
  • Spring for fast Rails actions via pre-loading
  • Web Console for better debugging via in-browser IRB consoles
  • SCSS-Lint for reporting violations of SCSS coding conventions
  • Coffeelint to keep Coffeescript code clean and consistent
  • Slim-Lint for reporting violations of Ruby style guide in .slim templates
  • Rails ERD for generating a diagram based on application's AR models

Testing Gems


  • 01_config.rb - shortcut for getting application config with app_config
  • mailer.rb - setup default hosts for mailer from configuration
  • requires.rb - automatically requires everything in lib/ & lib/extensions


  • bin/setup - setup required gems and migrate db if needed
  • bin/quality - runs rubocop, brakeman, rails_best_practices and bundle-audit for the app
  • bin/ci - should be used in the CI or locally
  • bin/server - to run server locally

Getting Started

Prepare dependencies

Some gems have native extensions. You should have GCC installed on your development machine.

  • qt - to run specs with Capybara Webkit
  • phantomjs198 - to run Javascript unit tests
  • graphviz - to generate Entity-Relationship Diagram

Setup required dependencies from Brewfile:

brew tap Homebrew/bundle
brew bundle

Bootstrap application

  1. Clone application as new project with original repository named "rails-base". We use depth parameter here in order not to copy the history of changes in base project

    git clone --depth 1 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[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git
    git push -u origin master
  3. Run setup script

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

  5. Run app

  6. Update README

    Do not forget to update application file with detailed information based on the existing template.

    mv doc/
    # update
    git commit -am "Update"


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


Something went wrong with that request. Please try again.