我尝试使用以下说明在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?
答案 0 :(得分:1)
使用screen -d -r
查看错误消息uncommon.mk:545: recipe for target 'rdoc' failed
代替:
rbenv install 2.6.3
要做:
RUBY_CONFIGURE_OPTS=--disable-install-doc rbenv install 2.6.3
答案 1 :(得分:0)
尝试
bundle exec ruby
应该工作