使用带有 rbenv 的 fish shell 找不到 bundle 程序

标签 bundler rbenv fish

在尝试将 Bundler 与 ruby​​ 1.9.3p194 一起使用时,我收到了错误消息:

> gem install bundler
Fetching: bundler-1.5.1.gem (100%)

> bundle install
fish: Unknown command 'bundle'

Rbenv 正在初始化 config.fish像这样:
set -x PATH "$HOME/.rbenv/bin" $PATH
. (rbenv init - | psub)

以及 rbenv init - 的输出:
> rbenv init -
setenv RBENV_SHELL fish
. '/Users/nifl/.rbenv/libexec/../completions/rbenv.fish'
rbenv rehash 2>/dev/null
function rbenv
  set command $argv[1]
  set -e argv[1]

  switch "$command"
  case rehash shell
    eval (rbenv "sh-$command" $argv)
  case '*'
    command rbenv "$command" $argv
  end
end

我没有将 fish 设置为默认 shell,并且 Bundler 在 Bash 中运行良好。

最佳答案

德普。之后需要重新哈希 > gem install bundler

> rbenv rehash

关于使用带有 rbenv 的 fish shell 找不到 bundle 程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20985512/

相关文章:

ruby - Capistrano 抛出一个 NoMethodError

ruby - bundle 不适用于 rbenv

ruby - 安装了中间人但找不到二进制文件

bash - 如何在 fish 中使用 bash 函数

shell - fish shell : filter $argv (lightweight/dynamic argparse)

ruby - 我无法运行 compass watch

ruby - Bundler.require 不需要 gemspec 中的依赖项

ruby - 无法卸载 bundle 程序 1.17.3

linux - shell 编程: How to use find in fish?

ruby - 安装 Bundler 时出错