Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no such command `shell' #142

Closed
slayer opened this issue Nov 9, 2011 · 5 comments
Closed

no such command `shell' #142

slayer opened this issue Nov 9, 2011 · 5 comments

Comments

@slayer
Copy link

slayer commented Nov 9, 2011

    rbenv 0.2.1
    usage: rbenv <command> [<args>]

    Some useful rbenv commands are:
       commands      List all rbenv commands
       rehash        Rehash rbenv shims (run this after installing binaries)
       global        Set or show the global Ruby version
       local         Set or show the local directory-specific Ruby version
       shell         Set or show the shell-specific Ruby version
       version       Show the current Ruby version
       versions      List all Ruby versions known by rbenv
       which         Show the full path for the given Ruby command
       whence        List all Ruby versions with the given command

    See 'rbenv help <command>' for information on a specific command.
    For full documentation, see: https://github.com/sstephenson/rbenv#readme
    vlad@pant /tmp $ rbenv versions
      1.8.7-p352
      1.9.2-p290
    * ree-1.8.7-2011.03 (set by /home/vlad/.rbenv/version)
    vlad@pant /tmp $ rbenv shell 1.9.2-p290
    rbenv: no such command `shell'
    vlad@pant /tmp $ 
@josh
Copy link
Contributor

josh commented Nov 9, 2011

This means you don't have rbenv init setup correctly.

# .bash_profile
eval "$(rbenv init -)"

@josh josh closed this as completed Nov 9, 2011
@slayer
Copy link
Author

slayer commented Nov 9, 2011

sorry, I think my bash does not want to load profile:

vlad@pant ~ $ tail -3 ~/.bash_profile  
[ -x /usr/bin/keychain ] && /usr/bin/keychain 
export PATH="$HOME/.rbenv/bin:$PATH" 
eval "$(rbenv init -)" 
vlad@pant ~ $  
vlad@pant ~ $  
vlad@pant ~ $  
vlad@pant ~ $ rbenv shell 
rbenv: no such command `shell' 
vlad@pant ~ $  
vlad@pant ~ $ . ~/.bash_profile  
vlad@pant ~ $  
vlad@pant ~ $ rbenv shell 
rbenv: no shell-specific version configured 
vlad@pant ~ $  
vlad@pant ~ $  

@mlafeldt
Copy link
Contributor

mlafeldt commented Nov 9, 2011

Seems like ~/.bash_profile is not sourced in your environment/OS. See #122 for discussion.

@kleinjm
Copy link

kleinjm commented Oct 19, 2018

On zsh you may need to move eval "$(rbenv init -)" to .zshenv instead of .zshrc so rbenv is available in non-interactive shells.

@enextus
Copy link

enextus commented Jul 30, 2021

I tried to use ~/.bashrc for my Ubuntu 20.04.
While file ~/.bash_profile LEFT EMPTY.
That works.

ChrisBAshton added a commit to alphagov/govuk-puppet that referenced this issue Nov 23, 2021
The `rbenv shell 2.6.3` command was added in #11214.
However, if I SSH into a mirrorer instance, run
`sudo su - govuk-crawler` and then run
`/usr/local/bin/seed-crawler-wrapper` (which is owned by
`govuk-crawler` user, hence why we assume that identity),
I get the following error:

> rbenv: no such command `shell'

This is apparently because the rbenv init script hasn't been
called:
rbenv/rbenv#142 (comment)

Trello: https://trello.com/c/QGIayBqP/2784-fix-the-govuk-crawler-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants