fv17の日記

Webエンジニアの備忘用ブログです。主にWeb界隈の技術に関して書いています。

Heroku

HerokuのWebサーバーをWEBrickからpumaに変更する

参照 devcenter.heroku.com config/puma.rb workers Integer(ENV['WEB_CONCURRENCY'] || 2) threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5) threads threads_count, threads_count preload_app! rackup DefaultRackup port ENV['PORT'] || 3000 en…

Herokuの本番環境でSSL

RailsをHerokuにデプロイした際に、SSLを強制させる設定 config/environments/production.rb Rails.application.configure do . . . # Force all access to the app over SSL, use Strict-Transport-Security, # and use secure cookies. config.force_ssl =…

HerokuにRailsをデプロイする方法

HerokuにRailsをデプロイする方法を備忘のためまとめる。 本番環境でPostgreSQLを使うように設定する HerokuのデータベースはPostgreSQLのため、 本番環境ではPostgreSQLを使う group :production do gem 'pg', '0.20.0' end 開発、テスト環境ではsqliteを使…