Install Latest Stable Version of Ruby Using rbenv

后端 未结 6 923
星月不相逢
星月不相逢 2020-12-24 02:07

I want to install the latest stable version of Ruby available with rbenv. This feature won\'t be happening in rbenv itself.

When I run the command rbenv instal

6条回答
  •  庸人自扰
    2020-12-24 02:40

    Mine is similar to Anonymous's answer (but shorter because I'm using \d).

    rbenv install -l|  grep -P "\s2.*(\.|\d)\d$" | tail -1
    

    I wanted to specify the latest jruby, which is why I used a "2", so I can replace the 2 with "jruby":

    rbenv install -l|  grep -P "\sjruby.*(\.|\d)\d$"|tail -1
    

    You can replace jruby with other strings to get different types of ruby, e.g. rbx, mruby.

提交回复
热议问题