一种方法是使用 aGemfile
并在其中设置 ruby 版本。像这样:
ruby '2.2.0'
Run Code Online (Sandbox Code Playgroud)
然后当您进入目录时,您将看到以下消息 rvm
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /Users/danmanstx/rails_projects/app/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
Run Code Online (Sandbox Code Playgroud)
在该目录中创建一个.ruby-version
包含您的版本信息的文件。要将目录的版本设置为 2.1.2,请创建仅包含“2.1.2”内容的文件。
$ cat .ruby-version
2.1.2
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2901 次 |
最近记录: |