ruby-versionを使う

久しぶりにrvmを触って.rvmrcを作成したら.ruby-versionにswitchしろみたいなメッセージが出たので
言われるがままにやってみた。

参考

rvmrcとは
rvmrcが便利 - rochefort's blog

エラー

You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to '.ruby-version' using 'rvm rvmrc to [.]ruby-version'
or ignore this warnings with 'rvm rvmrc warning ignore /home/git/gitlab/.rvmrc',
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.

 

how to switch

$ rvm rvmrc to ruby-version

$ cat .ruby-version
ruby-1.9.3-p392

ということで、これだけで.ruby-versionファイルに置換されます。
 

余談

(あたりまえですが)ruby界隈では、コンセンサス取れてる感じっぽいですね。
Ignore .ruby-version by adammck · Pull Request #9192 · rails/rails こういうのもありますし。