코딩 기록/error

[Error/Gem] ERROR: While executing gem ... (Gem::FilePermissionError) (+bundle install을 해결하기 위한 나의 노력의 기록...)

경스토리 2024. 7. 29. 10:29

gem install bundler 실행하니 에러뜸

 

https://happymemoryies.tistory.com/21

 

맥북(Macbook)에서 While executing gem ... (Gem::FilePermissionError) 에러가 발생할때

Slate라는 API 사양서 관리 오픈 플랫폼을 설치 하려고 했을때 발생했는데, 꽤 골치 아팠던 경험이라 기록을 하기로 하였습니다. 문제의 결론은 MacOS에서 기본 설치되어 있는 시스템 Ruby를 사용하

happymemoryies.tistory.com

위 게시글 보고 

$ echo '# rbenv' >> ~/.bash_profile

$ echo 'export PATH=~/.rbenv/bin:$PATH' >> ~/.bash_profile

$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

코드 추가해줌

해결이 안 돼서 

https://github.com/rbenv/rbenv/issues/1267

 

You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. · Issue #1267 · rbenv/rbenv

I'm trying to install bundler on my Mac OS Catalina, but it isn't letting me, help % gem install bundler ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions f...

github.com

이거 보고 추가해줬으나 내가 추가를 잘못한건지 해결이 안 됨 ㅜㅜ

 

https://chibest.tistory.com/116

 

gem install bundler permission issue

이런 에러가 발생할 경우 gem install bundler ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. 아래 명령

chibest.tistory.com

다시 이 글을 보고 

gem install bundler --user-install

했으나, warning과 error가 함께 뜸

https://stackoverflow.com/questions/53979362/you-dont-have-path-in-your-path-gem-executables-will-not-run-while-using

 

"You don't have [PATH ]in your PATH, gem executables will not run." while using "gem install --user-install bundler"

I was trying to install jekyll in my Mac and got the warning as following: WARNING: You don't have /Users/Carrot/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run. I checked thr...

stackoverflow.com

위 글을 보고 warning 수정 후 다시 코드를 치자 이번에는 다행히 warning은 해결됐는지

error만 뜸

코드에서 하라는 코드 그대로 입력하니 잘 install 명령문 실행됨

이후, bundle install을 해봤는데 이런 글이 떠서

gem update --system 3.2.3

해주니 다시 에러 또 발생

ERROR:  While executing gem ... (Errno::EACCES) 에러발생

https://velog.io/@bebrain/vscode-feat-Mac

 

react-native 환경설정 관련 에러 (feat : Mac)

/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-version-file-write: line 19: .ruby-version: Permission denied 잘 나가다가 local설정해주려니 에러가 떴다. > 해결방법 터미널에

velog.io

위 글을 보고 

sudo chown -R 내맥북이름 $HOME/ .rbenv

을 했으나 또 해결이 되지않음

https://stackoverflow.com/questions/17550903/why-do-i-get-a-permission-denied-error-while-installing-a-gem

 

Why do I get a "permission denied" error while installing a gem?

I'm attempting to install Jekyll. After running gem install jekyll I get this error: ERROR: While executing gem ... (Errno::EACCES) Permission denied - /usr/local/lib/ruby/gems/2.0.0/gems/jek...

stackoverflow.com

여기 나온대로

brew upgrade

를 했더니 노트북(big sur 버전 11.7.10)이 터질라그러면서 엄청 오래걸림

결국 업그레이드 강제종료시키고

brew를 다시 깔면 모든 문제가 해결될까해서 

brew 재설치를 시도하게 됨(install 칸에 가면 글 있음)