LoginSignup
1

More than 1 year has passed since last update.

posted at

Ruby on Rails 6にforeman導入メモ

gem導入

Gemfile
gem 'foreman', group: :development

Procfile.devを実行するbin/server作成

#!/bin/bash -i
bundle install
bundle exec foreman start -f Procfile.dev

コマンドを実行するProcfile.dev作成

Procfile.dev
web: /bin/sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
webpacker: ./bin/webpack-dev-server

bin/serverの権限変更

chmod 777 bin/server

サーバースタート

bin/server

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
1