Skip to content

Commit 007ea5f

Browse files
AnjanJclaude
andcommitted
Remove brew --prefix from shell startup (0.95s → 0.08s)
Remove RUBY_CONFIGURE_OPTS with brew --prefix openssl@1.1 from .zshrc-dhh-additions. It ran on every shell startup (~0.9s) but was unused — Ruby 4.0 uses OpenSSL 3.x, and the flag only matters when compiling Ruby from source. Added legacy Ruby build instructions to QUICK_REFERENCE.md for users who need to compile old Ruby versions (< 2.4) with OpenSSL 1.1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6ddc250 commit 007ea5f

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

.zshrc-dhh-additions

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,6 @@ alias hm='heroku run rails db:migrate'
504504
# 11. ENVIRONMENT SETUP
505505
# ============================================
506506

507-
# Ruby optimization
508-
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
509-
510507
# Disable Spring (DHH recommends for simplicity)
511508
export DISABLE_SPRING=1
512509

QUICK_REFERENCE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,24 @@ aerospace reload
275275
:source ~/.config/nvim/init.lua
276276
```
277277

278+
### Installing Legacy Ruby (< 2.4)
279+
280+
Old Ruby versions need OpenSSL 1.1 (modern Ruby uses OpenSSL 3.x automatically). Pass it as a one-off build flag — don't add it to your shell config:
281+
282+
```bash
283+
# Install openssl@1.1 if you don't have it
284+
brew install openssl@1.1
285+
286+
# Compile old Ruby with OpenSSL 1.1
287+
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" mise install ruby@2.x.x
288+
```
289+
290+
If you work with legacy projects frequently, add it to `~/.zshrc.local`:
291+
```bash
292+
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
293+
```
294+
Note: this adds ~0.9s to every shell startup due to the `brew --prefix` call.
295+
278296
### Reset Everything
279297
```bash
280298
# Neovim

0 commit comments

Comments
 (0)