Yuto Blog
Yuto Blog

Ruby on Rails 6にforeman導入メモ

gem導入

Copy Gemfile
1
gem 'foreman', group: :development

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

Copy bin/server
1
2
3
#!/bin/bash -i
bundle install
bundle exec foreman start -f Procfile.dev

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

Copy Procfile.dev
1
2
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の権限変更

Copy
1
chmod 777 bin/server
サーバースタート
Copy
1
bin/server
Updated by Yuto at 2023-05-09 21:05
Rate this article: 4.9/5 (29 ratings)
You didn't rate yet
Le Minh Thien Toan

Tác giả:Yuto Yasunaga

Xin chào các bạn. Mình là kỹ sư IT đang làm việc ở Nhật Bản. Mình tạo blog này để chia sẻ về cuộc sống và những kinh nghiệm trong quá trình học tập và làm việc.
Hy vọng bài viết này sẽ có ích cho bạn.