Pergunta

In attempting to use Bundler with ruby 1.9.3p194 managed with rbenv in the fish shell I receive the error:

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

> bundle install
fish: Unknown command 'bundle'

Rbenv is being initialized in config.fish like so:

set -x PATH "$HOME/.rbenv/bin" $PATH
. (rbenv init - | psub)

And the output of 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

I don't have fish set up as the default shell and Bundler is working fine in Bash.

Foi útil?

Solução

Derp. Needed rehash after > gem install bundler

> rbenv rehash

Outras dicas

Another issue that can appear is when using rbenv-communal-gems. jruby does not like the communization, it wants this:

rbenv sequester jruby-1.7.12

This allows you to re-run

gem install bundler
rbenv rehash

And then you can use the bundle command again.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top