티스토리 뷰
[iOS] CocoaPods pod init 오류 - uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
반해원 2025. 3. 3. 23:40안녕하세요. 반해원입니다.
이전에 CocoaPods 설치 및 사용방법에 대해 알아봤었는데요.
https://banhaewon.tistory.com/13
[iOS] CocoaPods 설치 및 사용방법
안녕하세요. 반해원입니다. CocoaPods에 대해 알아보겠습니다. 내용은 공홈을 참고했습니다.https://cocoapods.org/ CocoaPods.orgCocoaPods is built with Ruby and is installable with the default Ruby available on macOS. We recom
banhaewon.tistory.com
맥북을 포맷하고 오랜만에 공부하려고 설치하니 오류가 났지 말입니다...
그래서 열심히 구글링해서 해결한 방법을 정리해 보겠습니다.
🤢 오류
상황은 CocoaPods 설치까지는 된 상태에서 프로젝트 경로에 pod init 을 해주려 할 때 발생했습니다.
> pod init
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>' ...
그래서 대충 아래 오류 메시지로 구글링 ㄱㄱ링 해보니
uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
같은 현상을 겪으시는 분덜이 많더라구요.
두 링크 다 해결방법은 같았다지요.
바로바로...더보기
https://github.com/facebook/react-native/issues/48746
uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) · Issue #48746 · facebook/react-native
Description When running bundle install, the following error occurs Steps to reproduce Do a "bundle install" React Native Version 0.75.4 Affected Platforms Runtime - iOS Output of npx react-native ...
github.com
uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
rails 6.1.7.10 ruby 2.6.6. Just did a bundle update to 6.1.7.10 from 6.1.7.8 Now running the application I receive the following error: /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/
stackoverflow.com
😲 해결방법
Gemfile을 열어서 아래 문장을 추가해줘라~ 가 해결방법이었습니다.
버전문제이슈 때문인 것 같아요.
다~음 버전에서 해결해 주겠죠?
일단 아래 버전으로 맞춰줍니다.
gem 'concurrent-ruby', '1.3.4'
그런데 말입니다.
Gemfile이 뭐고 어딨죠?
ruby 라이브러리들을 gem이라 하고 이것들을 등록해서 쓰는 파일이라고 하네요. 글쿤.
여는 방법은 터미널에서 이렇게 치면 vscode로 열립니다. (없어도 생기는 듯...?)
> code Gemfile
열린 gemfile에 위의 concurrent-ruby 버전을 추가해 주고 저장해 줍니다.
이제 gem을 설치해줘야겠지요?
bundle install 명령어를 실행해서 Gemfile에 정의된 gem들을 설치해 줍니다.
> bundle install
[DEPRECATED] This Gemfile does not include an explicit global source. Not using an explicit global source may result in a different lockfile being generated depending on the gems you have installed locally before bundler is run. Instead, define a global source in your Gemfile like this: source "https://rubygems.org". Could not find gem 'concurrent-ruby (= 1.3.4)' in locally installed gems.
근데 전 위처럼 오류가 났어요.
concurrent-ruby (= 1.3.4) 가 로컬에 설치가 안되어있어서 그렇다네요.
이 글을 보고 따라 하시는 분이 있다면, 그리고 로컬에 설치한 적이 없으시다면 설치 먼저 해주시길...🙏🏻
> gem install concurrent-ruby -v 1.3.4
그러고 나서 bundle install 을 해주시면 됩니다.
이제 해치웠나..?
하고 다시 pod init을 했더니 이번에는 루비 버전 이슈로 오류가 납니다.. 하..
The `pod' command exists in these Ruby versions: 3.3.7
제 루비 버전을 확인해 보니 3.3.5 였네요.
3.3.7 버전이 설치는 되어있어서 환경설정만 바꿔줍니다.
> ruby -v
> rbenv global 3.3.7
그리고 다시 pod init 해보니 드.디.어. 오류가 안 납니다. 짝짝짝.
사실 오류 나고 처음에는 걍 귀찮아서 SPM으로 라이브러리 설정해서 썼는데
결국 다시 구글링 차근차근해서
해결방법대로 오류 해결했습니다.
기존 플젝에 있던 SPM도 제거해서 쓰는 방법도 간단히 정리해 봅니다.
Xcode로 프로젝트 열고
먼저
Project > Package Dependencies 로 가서 추가해 놓은 라이브러리들 다 - 눌러서 삭제해 줬습니다.
그리고
TARGETS - General - Frameworks, Libraries, and Embedded Content 에서 Pods~ 뫄뫄 빼고 남아있는 라이브러리들도 다 삭제해 줬습니다.
이제 빌드도 잘 되고 podfile 수정해서 라이브러리 추가도 잘 되는 것 확인 완.
구글링이 최고입니다.
끝입니다.
'iOS' 카테고리의 다른 글
[iOS] GCD (Grand Central Dispatch) (0) | 2025.03.12 |
---|---|
[iOS] CocoaPods 설치 및 사용방법 (0) | 2024.05.14 |
[iOS] Firebase로 앱 푸시 구현하기 1 - Firebase Console 프로젝트 생성 (0) | 2024.05.12 |
[iOS] .gitignore 생성하기 + 생성해주는 사이트 (0) | 2024.04.01 |
[iOS] Apple 개발자 계정 등록 - Apple Developer Program 가입 (0) | 2024.03.31 |
- Total
- Today
- Yesterday
- 콘솔
- Operation
- Constraints
- ruby
- SPM
- xcode
- AppleDeveloperProgram
- cocoapods
- 연동
- dependencymanager
- typora
- GCD
- IOS
- Firebase
- 테스트폰
- GIT
- Swift
- AutoLayout
- Branch
- Final
- Push
- markdown
- AppDelegate
- optional
- 개발자도구
- scenedelegate
- Chrome
- gitignore
- github
- markdowneditor
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |