1. 문제 상황

 

필자의 경우 cacaopads 설치 시도 중 문제가 발생했습니다.

sudo gem install cocoapods

 

문제 에러 안내 문구

ERROR:  Error installing cocoapods:
	The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.3. Try installing it with `gem install activesupport -v 6.1.7.3` and then running the current command again
	activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.

 

 

 

 

 

2. 문제 원인

 

 해당 오류는 Ruby 버전과 호환되는 Active Support 버전이 없어서 발생하는 것으로 보입니다. 따라서, 해결 방법으로는 Ruby 버전을 업그레이드하거나 Active Support 버전을 낮춰주는 것이 있습니다.

 

 

 

 

 

3. 해결 방법 - 1 : homebrew로 Ruby 최신 버전 설치하기


homebrew를 활용해 Ruby 최신 버전을 설치합니다.

 

brew install ruby

 

brew 사용을 위한 homebrew 설치 방법은 아래 게시글에서 확인할 수 있습니다.

https://growingsaja.tistory.com/740

 

[Macbook] 초기 기본 세팅 (앞으로의 편리한 몇 년을 위해)

[ 작업 환경 ] 1. Open Terminal & 아래 커맨드로 homebrew 설치 시도하기 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 설치가 완료되는데에 시간이 좀 소요됩니다. 그리고, 진

growingsaja.tistory.com

 

 

 

 

 

3. 해결 방법 - 2 : Ruby 경로 설정 및 버전 확인

 

설치된 Ruby 버전 중에서 원하는 버전을 기본 버전으로 설정한 뒤 버전을 확인합니다. 필자의 경우 mac 재부팅을 했더니 ruby 버전이 올라갔습니다.

 

echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

ruby -v

 

 

 

 

 

4. 해결 완료

 

sudo gem install cocoapods

 

 

 

'Infra > MacOS' 카테고리의 다른 글

[Mac] hosts 파일 수정 방법  (24) 2023.11.09
[SOLVED] zsh: command not found: brew  (0) 2023.05.06

+ Recent posts