rbenv installed. but rbenv shell not 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]
There is this note in rbenv's README (see Installation) about the shell
command:
Note that you'll need rbenv's shell integration enabled (step 3 of the installation instructions) in order to use this command.
Step 3 is:
Add rbenv init to your shell to enable shims and autocompletion.
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
Same as in previous step, use ~/.profile on Ubuntu, ~/.zshrc for Zsh.
Did you follow that instruction?
one gotya that I haven't seen posted on the internet is that in .bash_profile, you have ensure that
export PATH="$HOME/.rbenv/bin:$PATH"
is 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
not showing the version that was set by rbenv
rbvenv shell
returning "rbenv: no such command `shell’".
Don't ask how I know!
I today opened an issue in Github to propose an update to sstephenson's already awesome documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With