我正在尝试在Mac上安装cocoapods
Successfully installed cocoapods-0.25.0
1 gem installed
但是
$ pod install
-bash: pod: command not found
使用brew
$ which ruby
/usr/local/bin/ruby
$ which gem
/usr/local/bin/gem
以下是gem environment
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.3
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.5.0]
- INSTALLATION DIRECTORY: /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0
- RUBY EXECUTABLE: /usr/local/Cellar/ruby/2.0.0-p247/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/Cellar/ruby/2.0.0-p247/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0
- /Users/nt/.gem/ruby/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--no-rdoc --no-ri"
- "update" => "--no-rdoc --no-ri"
- REMOTE SOURCES:
- https://rubygems.org/
我应该导出或添加到.bash_profile以使pod install
正常工作?
答案 0 :(得分:2)
如果您像我一样使用rbenv,则在安装gem之后,您必须运行 rbenv rehash 以获取shims目录中的链接。
答案 1 :(得分:1)
我的不好,.bash_profile
中的这一行有帮助
export PATH=$PATH:/usr/local/Cellar/ruby/2.0.0-p247/bin