Rbenv shell is not a command

rbenv is installed. but rbenv shell is not a command.

ationtekiMacBook-Air:~ dation$ rbenv versions system * 2.0.0-p247 (set by /Users/dation/.ruby-version) dationtekiMacBook-Air:~ dation$ rbenv version 2.0.0-p247 (set by /Users/dation/.ruby-version) dationtekiMacBook-Air:~ dation$ rbenv shell rbenv: no such command `shell' 

 ationtekiMacBook-Air:~ dation$ ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] 
+4
source share
2 answers

In rbenv README there is this note (see Installation ) about the shell command:

Please note that to use this command you will need the integrated rbenv shell (step 3 of the installation instructions).

Step 3:

Add rbenv init to your shell to enable padding and autocomplete.

 $ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile 

As in the previous step, use ~ / .profile in Ubuntu, ~ / .zshrc for Zsh.

Have you followed this instruction?

+10
source

one gotya that i haven't seen on the internet is that in .bash_profile you guarantee that

 export PATH="$HOME/.rbenv/bin:$PATH" 

placed before

 eval "$(rbenv init -)" 

Otherwise, the shell will try to run rbenv init before it can be found.

Reversing these two lines will cause both problems described by the OP;

ruby -v does not display the version installed by rbenv

rbvenv shell return "rbenv: there is no such command` shell '.

Do not ask how I know!

Today I discovered a problem on Github to offer an update to sstephenson's already awesome documentation.

+3
source

Source: https://habr.com/ru/post/1501136/


All Articles