Rbenv:未安装Ruby找不到命令'ruby'(AWS t3a Ubuntu 18.04)

时间:2019-07-12 14:39:27

标签: rbenv

我尝试使用以下说明在AWS t3a上的Ubuntu 18.04上通过Rbenv安装Ruby:https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-18-04

sudo apt update
sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.6.3
rbenv global 2.6.3

但是,在rbenv global 2.6.3部分然后运行ruby -v之后,我得到了

Ruby not installed Command 'ruby' not found

但是当我运行rbenv versions时,它告诉我2.6.3已列出。

如何安装ruby?

2 个答案:

答案 0 :(得分:1)

使用screen -d -r查看错误消息uncommon.mk:545: recipe for target 'rdoc' failed

timeit module

中找到了解决方案

代替:

rbenv install 2.6.3

要做:

RUBY_CONFIGURE_OPTS=--disable-install-doc rbenv install 2.6.3

答案 1 :(得分:0)

尝试     bundle exec ruby 应该工作