我尝试使用rvm重新安装Ruby。当我尝试irb时,出现了这个问题:
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
from <internal:gem_prelude>:1:in `<compiled>'
请帮助
答案 0 :(得分:2)
RVM允许安装不同版本的rubygems:
rvm rubygems latest # installs the version locked in RVM = latest-1.8
rvm rubygems latest-1.8 # installs the latest version 1.8.x known for rubygems
rvm rubygems 1.8.19 # installs the given version
答案 1 :(得分:2)
使用
rvm info
查看您是否缺少zsh包。 如果你这样做,安装它并添加这一行:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
到$HOME/.zshrc