[email protected]:~$ rbenv global
1.9.3-p392
[email protected]:~$ rbenv local
1.9.3-p392
[email protected]:~$ which ruby-build
/usr/local/bin/ruby-build
[email protected]:~$ rbenv versions
* 1.9.3-p392 (set by /home/hyperrjas/.ruby-version)
[email protected]:~$ rbenv version
1.9.3-p392 (set by /home/hyperrjas/.ruby-version)
[email protected]:~$ rbenv rehash
[email protected]:~$ ruby -v
-bash: ruby: command not found
[email protected]:~$ env | grep PATH
PATH=/home/hyperrjas/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript
[email protected]:~$ export PATH="$HOME/.rbenv/bin:$PATH"
[email protected]:~$ ruby -v
-bash: ruby: command not found
Я работаю с ubuntu 12.04.-bash: ruby: command не найден
Это мой ~/.profile
файл:
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
eval "$(rbenv init -)"
eval "$(rbenv init -)"
Я установил рубин последнюю версию с rbenv и когда я пытаюсь ruby -v
я получаю -bash: ruby: command not found
Я думаю, что вам нужно запустить команда, которая добавляет рубин к вашему $ PATH, к сожалению, я понятия не имею, что эта команда, удачи! – OneChillDude
FWIW, вы можете подумать о переходе к [RVM] (http://rvm.io) –
RVM и rbenv одинаково хороши. rbenv более легкий вес и менее сложный, с меньшим количеством подвижных частей. У RVM есть много возможностей, и многое другое пойдет не так. –