After upgrading Mac OS X El Capitan, bloggers found that NIMA had lost many commands. And then my heart almost collapsed, my God! Apple, how can you treat me like this?I managed to install a good command, and you abandoned me like this. And then the first thing I found out was my pod brother, paralyzed, disappeared
Then I started the installation subconsciously, and entered sudo gem install cocoapods
in terminal, and the result was:
Scheme 1:
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
1 gem installed cocoapods
$ export PATH=$PATH:$HOME/Sofware/ruby/bin
The first solution is to modify the installation path of gem, change the default installation path of gem to $home/software/RUBY
directory, then install, and finally add the installation path to Path
, so that you can run the command without a complete path
Scheme 2:
$ gem install cocoapods -n ~/Software/ruby
In scheme 2, gem’s own parameter - N
– – is used to indicate the installation path. If you want to use this parameter, you need to add the path to Path
to run the command without a complete path
My personal suggestion is to use the first method to modify the installation path of gem. In this way, you do not need to specify the path with the - N
command every time
Similar Posts:
- Quick resolution of gem install redis error
- Failed to build gem native extension encountered while installing sass
- Setting up CocoaPods master repo [How to Fix Stuck Issue]
- Cocopods: You don’t have write permissions for the /usr/bin directory.
- Ifconfig command not found for Linux Installation Errors [How to Solve]
- [Linux] CONDA: command not found solution
- [Solved] Ruby cannot load such file — zlib, openssl(LoadError), gem No rule to make target `/include/ruby.h’
- Eclipse can’t open, prompt could not open jvm.cfg error
- [Solved] Execute the redis command redis-trib.rb to view the cluster information error: cannot load such file — redis (LoadError)
- MySQL import file prompt — secure file priv option problem