[RVM] .rvmrc から .ruby-version と .ruby-gemset に移行すべき
RVM で .rvmrc ファイルで Ruby のバージョンと gemset を切り替えていたのですが、今だとWarningメッセージが表示されるんですね。
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 /Users/your_username/git/myapp/.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'. Using /Users/your_username/.rvm/gems/ruby-2.0.0-p247 with gemset myapp |
どうやら、これからはRubyのバージョン管理システム(rvm, rbenv, rbfu)で設定ファイルを統一する動きがあったそうで、下記のように .ruby-version と .ruby-gemset に分割しておいた方がよさそうです。
.rvmrc ファイル
rvm use ruby-2.0.0-p247@mygemset |
↓ .rvmrc を2ファイルに分割します。
.ruby-version ファイル
ruby-2.0.0-p247 |
.ruby-gemset ファイル
mygemset |
もちろん、従来の .rvmrc ファイルも使えるので、その場合、警告を無視するには下記のコマンドを実行すればOKです。
rvm rvmrc warning ignore all.rvmrcs |
参考情報
・Use rvmrc or ruby-version file to set a project gemset with RVM? – Stack Overflow
・.rvmrcから.ruby-gemsetと.ruby-versionに移行 – Qiita [キータ]