问题描述
pre> rvm --default use ruby-1.9.3-p0@rails3.2
然后看看是否会粘上?在同一时间使用create和default不是我以前尝试过的,它是唯一让我感觉不合适的东西。
鉴于下面的讨论,我提供这个作为解决问题的手段。 (就个人而言,我可能会并重新开始。)但 ,如果你想试试这个安装,那么我会看看你的 .rvm 文件夹,特别是在 .rvm / environments / default ,它将包含为默认环境导出的所有环境变量。在这里你会发现 rvm_gemset_name 这可能被错误设置,并且由于某种原因(权限?)没有更新,或者在这种情况下设置了其他一些其他环境问题。如果文件不正确,你可以在文件中手动设置它。
I'm trying to make a gemset the default whenever I start a new terminal in Mac OS X:
rvm use 1.9.3@rails3.2 --create --default
That seems to work, the rails3.2 gemset becomes the current gemset:
$ rvm gemset list gemsets for ruby-1.9.3-p0 (found in /Users/me/.rvm/gems/ruby-1.9.3-p0) global => rails3.2 $
But when I open up a new terminal, the rails3.2 gemset is no longer the current:
$ rvm gemset list gemsets for ruby-1.9.3-p0 (found in /Users/me/.rvm/gems/ruby-1.9.3-p0) global rails3.2 $
What do I do?
Have you tried specifying rvm --default use after the gemset is created so passing:
rvm --default use ruby-1.9.3-p0@rails3.2
and then seeing if that sticks? Using create and default at the same time isn't something I've tried before, it's the only thing that strikes me as out of place.
Given the discussion below I'd offer this as a means for dealing with the problem. (Personally, I'd probably implode rvm and start over.) But, if you wanted to try to make a go of it with this install then I'd look at your .rvm folder, specifically in .rvm/environments/default which will contain all the environment variables exported for the default environment. Here you'll find rvm_gemset_name this may be set incorrectly and isn't updated for some reason (permissions?) or is set correctly in which case its some other environment issue. You could try manually setting it here in the file if its not correct.
这篇关于如何在RVM中创建gemset默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!