Commit 91cb449
fix(ruby/gem): add Ruby to audit and require rbenv before gem update
Problem: gem update failed with apt-managed Ruby
- gem showed as outdated but Ruby wasn't audited
- gem update --system fails on apt-managed Ruby with error:
"Your RubyGems was installed through APT, and upgrading it through
RubyGems itself is unsupported"
- No dependency ordering between Ruby and gem
Solution: Add Ruby auditing and enforce rbenv requirement
Changes to cli_audit.py:
- Added Ruby to TOOLS tuple for auditing
- Ruby now shows in audit output (status: UNKNOWN due to version format)
- Processing order: Ruby (order 32) → gem (order 33)
Changes to install_gem.sh:
- Added check_rbenv_ruby() to detect if Ruby is rbenv-managed
- update_gem() now checks and refuses to update apt-managed gem
- Provides clear error message: "Please install Ruby via rbenv first"
- reconcile_gem() automatically installs Ruby via rbenv if needed
Expected workflow:
1. make upgrade → shows Ruby (apt 3.2 → rbenv 3.3.6+)
2. User installs Ruby → removes apt, installs rbenv
3. make upgrade → shows gem (3.4.20 → 3.7.2)
4. User updates gem → gem update --system works (rbenv-managed)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 0ece67e commit 91cb449
2 files changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| 810 | + | |
810 | 811 | | |
811 | 812 | | |
812 | 813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
19 | 36 | | |
20 | 37 | | |
21 | 38 | | |
| |||
24 | 41 | | |
25 | 42 | | |
26 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
27 | 54 | | |
28 | 55 | | |
29 | 56 | | |
| |||
58 | 85 | | |
59 | 86 | | |
60 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
61 | 91 | | |
62 | 92 | | |
63 | 93 | | |
| |||
0 commit comments