Skip to content

Instantly share code, notes, and snippets.

@svlasov
Created March 22, 2014 10:29
Show Gist options
  • Save svlasov/9704618 to your computer and use it in GitHub Desktop.
Save svlasov/9704618 to your computer and use it in GitHub Desktop.
New Rails 4 application setup
# ~/.bashrc
--skip-bundle
--skip-test
--database postgresql
source 'https://rubygems.org'
gem 'rails', '4.0.4'
gem 'pg'
gem 'sass-rails', '~> 4.0.2'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'puma'
gem 'foreman'
web: bundle exec puma -C config/puma.rb
# config/puma.rb
# see more at https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
workers Integer(ENV['PUMA_WORKERS'] || 3)
threads Integer(ENV['MIN_THREADS'] || 1), Integer(ENV['MAX_THREADS'] || 16)
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# worker specific setup
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.establish_connection
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment