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

ruby2-rails4-bootstrap-heroku

> 后端框架
开源

基于 Ruby 2.4、Rails 4.2 和 Sass 3 的 Bootstrap 的启动应用程序,可在 Heroku 上部署

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

工具介绍

基于 Ruby 2.4、Rails 4.2 和 Sass 3 的 Bootstrap 的启动应用程序,可在 Heroku 上部署

Rails 4 Starter App

This is a starter web application based on the following technology stack:

  • Ruby 2.4.10
  • Rails 4.2.11.3
  • Puma
  • PostgreSQL
  • RSpec
  • Twitter Bootstrap for Sass 3.4.1
  • Autoprefixer
  • Font Awesome 4.7.0
  • Slim
  • RuboCop
  • Slim-Lint
  • SCSS-Lint

Starter App is deployable on Heroku. Demo: https://ruby2-rails4-bootstrap-heroku.herokuapp.com/

Gemfile also contains a set of useful gems for performance, security, api building...

Thread safety

We assume that this application is thread safe. If your application is not thread safe or you don't know, please set the minimum and maximum number of threads usable by puma on Heroku to 1:

bash
$ heroku config:set RAILS_MAX_THREADS=1

Heroku Platform API

This application supports fast setup and deploy via app.json:

bash
$ curl -n -X POST https://api.heroku.com/app-setups \
-H "Content-Type:application/json" \
-H "Accept:application/vnd.heroku+json; version=3" \
-d '{"source_blob": { "url":"https://github.com/diowa/ruby2-rails4-bootstrap-heroku/tarball/main/"} }'

More information: Setting Up Apps using the Platform API

Recommended add-ons

Heroku's Production Check recommends the use of the following add-ons, here in the free version:

bash
$ heroku addons:create newrelic:wayne # App monitoring
$ heroku config:set NEW_RELIC_APP_NAME="Rails 4 Starter App" # Set newrelic app name
$ heroku addons:create papertrail:choklad # Log monitoring

Secrets.yml

Rails 4.1.0 introduced secrets.yml. Heroku automatically sets a proper configuration variable in new applications. Just in case you need, the command line is:

bash
$ heroku config:add SECRET_KEY_BASE="$(bundle exec rake secret)"

NOTE: If you need to migrate old cookies, please read the above guide.

Tuning Ruby's RGenGC

Generational GC (called RGenGC) was introduced from Ruby 2.1.0. RGenGC reduces marking time dramatically (about x10 faster). However, RGenGC introduce huge memory consumption. This problem has impact especially for small memory machines.

Ruby 2.1.1 introduced new environment variable RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR to control full GC timing. By setting this variable to a value lower than the default of 2 (we are using the suggested value of 1.3) you can indirectly force the garbage collector to perform more major GCs, which reduces heap growth.

bash
$ heroku config:set RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.3

More information: Change the full GC timing

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

Rubybootstrapfont-awesomeherokupostgresql

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

> 工具信息

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

> 相关工具

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