rbenv: bash: rbenv: command not found
I’m currently running Debian Wheezy. I followed the instructions for the standard rbenv installation on http://octopress.org/docs/setup/rbenv/ Since I’m running Debian, I changed the commands to add rbenv to my .bashrc instead of .bash_profile:
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build '
I then ran
source ~/.bashrc
and got the following error:
bash: rbenv: command not found
Any ideas about what I’m doing wrong?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 22 (5 by maintainers)
@eshacker make sure your shell is restarted. instead of
exec $SHELL
try this:exec -l $SHELL
it’ works for me.if it doesn’t cut it, go ahead and reinstall ruby. and continue this chapter
I had same problem after following https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-centos-7 :
On centos 7
sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
cd git clone git://github.com/sstephenson/rbenv.git .rbenv echo ‘export PATH=“$HOME/.rbenv/bin:$PATH”’ >> ~/.bash_profile echo ‘eval “$(rbenv init -)”’ >> ~/.bash_profile exec $SHELL
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build echo ‘export PATH=“$HOME/.rbenv/plugins/ruby-build/bin:$PATH”’ >> ~/.bash_profile exec $SHELL
But this put things in ~/.bash_profile, didn’t work. I put relevant path exports to ~/.bashrc and it worked.
I also installed rbenv-doctor:
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
to check the state of things. Then, just rbenv install -v 2.3.0Hi @magoo23. One thing that stands out to me from what you shared is that you might have been logged in as the wrong user. It seems that you might have been logged in as root before? Can you ensure you’re logged in as ordinary user, and that rbenv is cloned into
~/.rbenv
and owned by your user (not root) and that~/.bashrc
is like you shown us above. It might help!