Skip to content

Commit 6cc93c7

Browse files
committed
Modernize process manager documentation
Replace outdated foreman-issues.md with comprehensive process-managers.md guide. Changes: - Create docs/building-features/process-managers.md with modern guidance - Documents both Overmind (recommended) and Foreman - Explains why React on Rails needs multiple processes - Includes authoritative explanation from Foreman's wiki about not bundling - Shows how bin/dev works under the hood - Move docs/building-features/foreman-issues.md to docs/outdated/ - Preserves 2017-era bug reports for historical reference - Removes clutter from main docs (outdated/ filtered from navigation) - Update lib/react_on_rails/dev/process_manager.rb - Change link from our old doc to official Foreman wiki - Users get explanation directly from authoritative source Addresses feedback that foreman-issues.md was outdated and didn't mention modern alternatives like Overmind (which bin/dev actually prefers).
1 parent 3c6a697 commit 6cc93c7

File tree

3 files changed

+92
-1
lines changed

3 files changed

+92
-1
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Using Process Managers with React on Rails
2+
3+
React on Rails requires running multiple processes simultaneously during development:
4+
5+
- Rails server
6+
- Webpack dev server (client bundle)
7+
- Webpack watcher (server bundle)
8+
9+
## Running Your Development Server
10+
11+
React on Rails includes `bin/dev` which automatically uses Overmind or Foreman:
12+
13+
```bash
14+
./bin/dev
15+
```
16+
17+
This script will:
18+
19+
1. Try to use Overmind (if installed)
20+
2. Fall back to Foreman (if installed)
21+
3. Show installation instructions if neither is found
22+
23+
## Installing a Process Manager
24+
25+
### Overmind (Recommended)
26+
27+
Overmind provides easier debugging and better signal handling:
28+
29+
```bash
30+
# macOS
31+
brew install overmind
32+
33+
# Linux
34+
# See: https://github.com/DarthSim/overmind#installation
35+
```
36+
37+
### Foreman (Alternative)
38+
39+
Foreman is a widely-used Ruby-based process manager:
40+
41+
```bash
42+
# Install globally (NOT in Gemfile)
43+
gem install foreman
44+
```
45+
46+
**Important:** Do NOT add Foreman to your `Gemfile`. Install it globally on your system.
47+
48+
**Why not in Gemfile?**
49+
50+
From [Foreman's documentation](https://github.com/ddollar/foreman/wiki/Don't-Bundle-Foreman):
51+
52+
> Foreman is not a library, and should not affect the dependency tree of your application.
53+
54+
Key reasons:
55+
56+
- **Dependency conflicts**: Including Foreman in your Gemfile can create dependency conflicts that break other projects
57+
- **Security risk**: Loading Foreman as an application dependency creates an unnecessary security vulnerability vector
58+
- **Stability**: Foreman is mature and stable; bundling it could introduce bugs from unnecessary dependency updates
59+
- **Wrong abstraction**: Foreman is a system tool, not an application dependency
60+
61+
Install Foreman globally: `gem install foreman`
62+
63+
## Alternative: Run Process Managers Directly
64+
65+
You can also run process managers directly instead of using `bin/dev`:
66+
67+
```bash
68+
# With Overmind
69+
overmind start -f Procfile.dev
70+
71+
# With Foreman
72+
foreman start -f Procfile.dev
73+
```
74+
75+
## Customizing Your Setup
76+
77+
Edit `Procfile.dev` in your project root to customize which processes run and their configuration.
78+
79+
The default `Procfile.dev` includes:
80+
81+
```procfile
82+
rails: bundle exec rails s -p 3000
83+
wp-client: bin/shakapacker-dev-server
84+
wp-server: SERVER_BUNDLE_ONLY=true bin/shakapacker --watch
85+
```
86+
87+
## See Also
88+
89+
- [HMR and Hot Reloading](./hmr-and-hot-reloading-with-the-webpack-dev-server.md)
90+
- [Foreman documentation](https://github.com/ddollar/foreman)
91+
- [Overmind documentation](https://github.com/DarthSim/overmind)
File renamed without changes.

lib/react_on_rails/dev/process_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def show_process_manager_installation_help
147147
DO NOT add foreman to your Gemfile. Install it globally on your system.
148148
149149
For more information about why foreman should not be in your Gemfile, see:
150-
https://github.com/shakacode/react_on_rails/blob/master/docs/javascript/foreman-issues.md
150+
https://github.com/ddollar/foreman/wiki/Don't-Bundle-Foreman
151151
152152
After installation, try running this script again.
153153
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

0 commit comments

Comments
 (0)