gpt4 book ai didi

ruby - Gem 安装不会创建指向 bin 的链接

转载 作者:太空宇宙 更新时间:2023-11-03 18:20:39 25 4
gpt4 key购买 nike

我正在尝试在 Mac 上安装 cocoapods

Successfully installed cocoapods-0.25.0
1 gem installed

但是

$ pod install
-bash: pod: command not found

Ruby 是使用 brew 安装的

$ which ruby
/usr/local/bin/ruby

$ which gem
/usr/local/bin/gem

这是 gem 环境的输出

$ 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 正常工作?

最佳答案

如果您使用 rbenv像我一样,在安装 gem 后,您必须运行 rbenv rehash 才能在 shims 目录中获取链接。

关于ruby - Gem 安装不会创建指向 bin 的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19024025/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com