ずっしゃぁ☆

今回はちょっとしたプログラミングネタを。
「Ruby」というプログラミング言語があるのですが、Rubyのバージョンを指定して利用できる「RVM」というものがあります。
セキュリティ上別のバージョンを使わないといけないときなどに役に立つのですが、RVMの入れ方がまずかったらしくRedmineが動かなくなっていたのでアンインストールすることに。

……で、アンインストールする時は「rvm implode」と打てばいいらしいのですが、なんとrvm seppukuというのがあるようです。

か「切腹って……ほ……本当にこれでアンインストールできるのかな……?」

kptech@alice-m-desktop:~/.railsapp/redmine$ rvm seppuku
Are you SURE you wish for rvm to implode?
This will recursively remove /home/kptech/.rvm and other rvm traces?
(anything other than 'yes' will cancel) > 

か「えっ(yesと入力してEnter)」

Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and rvm-auto-ruby)
Removing rvm wrappers in /home/kptech/.rvm/bin
Hai! Removing /home/kptech/.rvm
rm: `/etc/profile.d/rvm.sh' を削除できません: 許可がありません
Could not remove '/etc/profile.d/rvm.sh', please try removing it manually.
/home/kptech/.rvm has been removed.

Note you may need to manually remove /etc/rvmrc and ~/.rvmrc if they exist still.
Please check all .bashrc .bash_profile .profile and .zshrc for RVM source lines and delete or comment out if this was a Per-User installation.
Also make sure to remove `rvm` group if this was a system installation.
Finally it might help to relogin / restart if you want to have fresh environment (like for installing RVM again).
kptech@alice-m-desktop:~/.railsapp/redmine$ rvm
cat: /home/kptech/.rvm/VERSION: そのようなファイルやディレクトリはありません
bash: /home/kptech/.rvm/scripts/base: そのようなファイルやディレクトリはありません
bash: /home/kptech/.rvm/scripts/help: そのようなファイルやディレクトリはありません

アンインストール成功。
……ということで面白いアンインストールコマンドの話でした。

手倉テイム
手倉テイム

1997年6月20日、熊本県生まれ。2017年3月~福岡県在住。現在はフードデリバリーの配達を主たる業務とした個人事業主。
両親曰く「手倉は物事の考え方が(世間より)3年早い」。

記事本文: 88