Updating gem error: No such file or directory - getcwd

Mac OS version: 10.13.6
Issue:
I want to install pod, and when I was updating gem, this error occurred: 'No such file or directory - getcwd'
Solution:

[Mac:~ Asa$ curl -L get.rvm.io | bash -s stable
[Mac:~ Asa$ sudo gem update --system
[Mac:~ Asa$ sudo gem install -n /usr/local/bin cocoapods --pre
[Mac:~ Asa$ pod setup

And then, restart your terminal.

你可能感兴趣的:(Updating gem error: No such file or directory - getcwd)