You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

迁移MacBook后重装rvm执行./configure时遇错误求助

Fixing RVM Ruby 2.3.3 Installation Failures Post-Mac Migration (Fish Shell)

Hey there, I’ve run into this exact combination of issues before—migrating a MacBook, using Fish shell, and trying to install older Ruby versions with RVM. Let’s walk through fixing this step by step:

1. Wipe Existing RVM Residues First

Migration often leaves behind corrupted or mismatched RVM files. Let’s start fresh:

# Uninstall RVM completely
rvm implode
# Remove leftover system and user RVM files
sudo rm -rf /etc/rvmrc ~/.rvm

Close and reopen your Fish terminal to ensure all traces are gone.

2. Reinstall RVM with Fish Shell Support

RVM was built for Bash/Zsh, so we need to set it up properly for Fish:
First, install RVM using Bash (since the installer relies on Bash syntax):

bash -c "$(curl -sSL https://get.rvm.io)"

Next, add Fish shell support for RVM. The simplest way is to manually configure your Fish config:
Open ~/.config/fish/config.fish in your favorite text editor and add this line:

source ~/.rvm/scripts/rvm

Reopen your terminal again to load the new RVM configuration.

3. Install Required Dependencies for Ruby 2.3.3

Ruby 2.3.3 is an older version that needs specific system libraries to compile on macOS 10.13:

  1. Install Xcode Command Line Tools (if not already installed):
xcode-select --install
  1. Use Homebrew to install critical libraries (install Homebrew first if you haven’t already):
brew install openssl libyaml libffi

4. Install Ruby 2.3.3 with Correct Library Paths

The most common failure here is missing OpenSSL support. Tell RVM to use the Homebrew-installed OpenSSL (which is compatible with Ruby 2.3.3):

rvm install 2.3.3 --with-openssl-dir=$(brew --prefix openssl)

This command forces Ruby to compile against the compatible OpenSSL version instead of the system’s outdated one.

5. Fix Permissions (If Issues Persist)

Migration can mess up file ownership. Ensure you own the RVM directory to avoid permission errors:

sudo chown -R $USER:$GROUP ~/.rvm

Quick Checks to Confirm Success

After installation, run these commands in Fish to verify everything works:

# List installed Ruby versions
rvm list
# Switch to Ruby 2.3.3
rvm use 2.3.3
# Confirm the correct Ruby version is active
ruby -v

If you still hit errors, dig into the configure.log file you mentioned—look for lines mentioning missing libraries (like OpenSSL) or shell syntax errors (which would point to a Fish configuration issue).

内容的提问来源于stack exchange,提问作者rj487

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:55:48