[英]How to set the default gemset in RVM with Rails & Heroku
我需要在我的Gemfile中為Heroku指定一個ruby版本 :
ruby '2.1.1'
這按預期工作。 然而,它也與我的本地終端混淆。 我嘗試在RVM中設置默認的ruby版本和gemset :
$ rvm --default use ruby-2.1.1@rails4
Using /Users/scott/.rvm/gems/ruby-2.1.1 with gemset rails4
$ rvm gemset list
gemsets for ruby-2.1.1 (found in /Users/scott/.rvm/gems/ruby-2.1.1)
(default)
global
=> rails4
看起來很好,它按預期工作。 但是,如果我打開另一個終端shell,我會得到這個:
Last login: Fri Mar 14 16:54:23 on ttys009
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/scott/code/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
$ rvm gemset list
gemsets for ruby-2.1.1 (found in /Users/scott/.rvm/gems/ruby-2.1.1)
=> (default)
global
rails4
我希望它始終使用rails4
gemset! 我怎樣才能做到這一點?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.