Cocoapods 的新功能,安装后不断出错

New with Cocoapods, keep getting errors after installing

这是我第一次这样做,但是按照 cocoa pods 的在线说明进行操作后,我似乎无法在安装后使用它。有人可以帮忙吗?

Ronalds-Air:~ ronaldm$ gem install cocoapods --user-install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /Users/ronaldm in PATH, mode 040707
Fetching: cocoapods-1.0.1.gem (100%)
WARNING:  You don't have /Users/ronaldm/.gem/ruby/2.0.0/bin in your PATH,
  gem executables will not run.
Successfully installed cocoapods-1.0.1
Parsing documentation for cocoapods-1.0.1
1 gem installed

然后我尝试了这种方式

Ronalds-Air:~ ronaldm$ /Users/ronaldm/.gem/ruby/2.0.0/bin/pod install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /Users/ronaldm in PATH, mode 040707
[!] No `Podfile' found in the project directory.

我尝试了 sudo 但没有帮助,我们将不胜感激

该错误不会阻止您向 iOS 添加依赖项,但会阻止您运行 任何 gem 可执行文件。

在 ~/.bash_profile 的底部添加以下行(如果不存在,则创建它)

export PATH="~/.gem/ruby/2.0.0/bin:$PATH"