LoginSignup
25
3

More than 3 years have passed since last update.

rbenv: no such command `install' となってinstallできない時の対処

Last updated at Posted at 2020-03-12

エラー内容

rbenvで違うバージョンのrubyをインストールしようとしたら以下のメッセージが出た

$ rbenv install -l
rbenv: no such command `install`

$ rbenv install 2.5.1
rbenv: no such command `install'

解決

ruby-buildが必要でそれをcloneしたら解決

$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Cloning into '/root/.rbenv/plugins/ruby-build'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10685 (delta 0), reused 3 (delta 0), pack-reused 10677
Receiving objects: 100% (10685/10685), 2.23 MiB | 705.00 KiB/s, done.
Resolving deltas: 100% (7027/7027), done.

$ rbenv install -l
1.8.5-p52
1.8.5-p113
1.8.5-p114
25
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
3