百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rails-base

> 后端框架
开源

新的基于 Rails 的项目的骨架。

198 stars0 点赞5 次浏览
访问官网GitHub

工具介绍

新的基于 Rails 的项目的骨架。

Rails Base

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

Application Gems

  • Sass for Sass/Scss stylesheets
  • Zurb Foundation as CSS framework. For more information see documentation on using Foundation in Rails apps
  • Foundation Icon Font for icons. Browse icon set examples
  • Autoprefixer for writing CSS without vendor prefixes
  • Slim for views
  • Simple Form for forms
  • Responders to DRY controllers
  • Decent Exposure to DRY controllers
  • Draper to decorate models for views
  • Decent Decoration to extend Decent Exposure with Draper
  • Interactors encapsulates application's business logic
  • Action Policy to encapsulate authorization logic
  • Kaminari for pagination
  • Devise for basic auth
  • Rollbar for exception notification
  • Google Analytics Rails for Google Analytics support

Development Gems

  • Puma as Rails web server
  • 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
  • Brakeman for checking application for common security vulnerabilities
  • ByeBug as debugger
  • 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
  • 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

  • Capybara for integration testing
  • Factory Bot for test data
  • RSpec for unit testing
  • Shoulda Matchers for common RSpec matchers
  • Email Spec for common matchers for testing emails

Initializers

  • mailer.rb - setup default hosts for mailer from configuration
  • requires.rb - automatically requires everything in lib/ & lib/extensions

Scripts

  • 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/test - runs all tests and quality checks
  • bin/server - to run server locally

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.

  • phantomjs - to run Javascript unit tests
  • graphviz - to generate Entity-Relationship Diagram
  • node - JavaScript runtime

Bootstrap application

  1. Clone application as new project with original repository named "rails-base".

    bash
    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.

bash
git remote add origin [email protected]:[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git
git push -u origin master
  1. Run setup script
bash
bin/setup
  1. Run test and quality suits to make sure all dependencies are satisfied and applications works correctly before making changes.
bash
bin/test
  1. Run app
bash
bin/server
  1. Update README

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

bash
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 Postgres add-on will be used for database.
  • SendGrid add-on required to be able to send emails.
  • NewRelic add-on could be used to monitor application performance.
  • Rollbar add-on could be used to application errors.
bash
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="[email protected]" 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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyrailsrubyskeleton

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架