# Rails 安裝foreman ###### tags: `rails`, `ruby` 環境: > ruby 2.6.7 > > Rails 6.1.3.1 > > Ubuntu 20.04 LTS > <font color="red">**RubyGem**:</font><font size=4>[**foreman**](https://rubygems.org/gems/foreman)</font> <!-- <font size=4></font> --> <!-- <font color="red"</font> --> ## :memo: ### Step 1: 移至Gemflie, 安裝foreman ```ruby= # Gemflie gem 'foreman', '~> 0.87.2' # ubuntu $ sudo apt install imagemagick ``` ### Step 2: 在專案根目錄, 建立Procfile檔案, 並輸入要執行的指令。 ```ruby= # 路徑:/appname/Procfile (自訂名)web: bin/rails server -p 3000 (自訂名)webpacker: bin/webpack-dev-server # 輸入完後,ubuntu執行 $ foreman start ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up