You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port documentation from react_on_rails#2301 explaining how to use
bin/conductor-exec wrapper for version manager compatibility.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
# React Webpack Rails Tutorial - Development Guide
2
+
3
+
## Build and Test Commands
4
+
5
+
```bash
6
+
# Run development server
7
+
bin/dev
8
+
9
+
# Run tests
10
+
bundle exec rspec
11
+
12
+
# Run linting
13
+
bundle exec rubocop
14
+
15
+
# Auto-fix linting issues
16
+
bundle exec rubocop -a
17
+
```
18
+
19
+
## Conductor Compatibility (Version Managers)
20
+
21
+
### Problem
22
+
23
+
Conductor runs commands in a non-interactive shell that doesn't source `.zshrc`. This means version manager shell hooks (like mise's PATH reordering based on `.tool-versions`) never run. Commands will use system Ruby/Node instead of project-specified versions.
24
+
25
+
**Symptoms:**
26
+
-`ruby --version` returns system Ruby (e.g., 2.6.10) instead of project Ruby (e.g., 3.4.3)
27
+
- Pre-commit hooks fail with wrong tool versions
28
+
-`bundle` commands fail due to incompatible Ruby versions
29
+
- Node/pnpm commands use wrong Node version
30
+
31
+
### Solution
32
+
33
+
Use the `bin/conductor-exec` wrapper to ensure commands run with correct tool versions:
34
+
35
+
```bash
36
+
# Instead of:
37
+
ruby --version
38
+
bundle exec rubocop
39
+
pnpm install
40
+
git commit -m "message"
41
+
42
+
# Use:
43
+
bin/conductor-exec ruby --version
44
+
bin/conductor-exec bundle exec rubocop
45
+
bin/conductor-exec pnpm install
46
+
bin/conductor-exec git commit -m "message"# Pre-commit hooks work correctly
47
+
```
48
+
49
+
The wrapper:
50
+
- Uses `mise exec` when mise is available
51
+
- Falls back to direct execution for non-mise users (asdf, rbenv, nvm, nodenv)
52
+
53
+
### Reference
54
+
55
+
See [react_on_rails-demos#105](https://github.com/shakacode/react_on_rails-demos/issues/105) for detailed problem analysis and solution development.
0 commit comments