【问题标题】:RVM version [1.19.1] requires a change to .rvmrc fileRVM 版本 [1.19.1] 需要更改 .rvmrc 文件
【发布时间】:2013-04-02 15:31:29
【问题描述】:

消息:

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/wadawadabingbang/Sites/my_amazing_fn_website/.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'.

我应该执行什么命令?

我的 ruby​​ 版本是ruby-1.9.3-p385

【问题讨论】:

标签: ruby-on-rails ruby rvm


【解决方案1】:

如果您不想在您运行的所有项目中更改您的 .rvmrc 文件(正如 Yule 所说)rvm rvmrc warning ignore all.rvmrcs 。它将忽略您所有项目的此警告消息

如果您不想仅为该项目更改 .rvmrc 文件,请运行 rvm rvmrc warning ignore /Users/wadawadabingbang/Sites/my_amazing_fn_website/.rvmrc

但是,此消息建议将您的 .rvmrc 移至新系统。要做到这一点,你只需要在里面创建.ruby-version 和你的 ruby​​ 版本:1.9.3-p385 并删除 .rvmrc。就是这样。

希望这会有所帮助。

【讨论】:

  • 你能帮我澄清一下吗?那么,随着 RVM 从 .rvmrc 迁移到 .ruby-version 文件,我们都应该改变吗?
  • 从 .rvmrc 迁移到 .ruby-version 不是强制性的。这是统一 ruby​​ 版本管理器的建议,因为 rbenv 使用 .ruby-version。如果您不想更改所有项目,只需运行 rvm rvmrc warning ignore all.rvmrcs
【解决方案2】:

我将我的 .rvmrc 重命名为 .ruby-version 并更改了内容

来自

rvm_trust_rvmrcs_flag=1
rvm use ruby-2.0.0-p0@MYGEMSET --create

ruby-2.0.0-p0@MYGEMSET

【讨论】:

  • +1 用于包含 @GEMSET 文档,而接受的答案实际上并没有这样做。
【解决方案3】:

应该在

之后工作

rvm get head

它对我有用

【讨论】:

    【解决方案4】:

    这类似于CupraR_On_Rails 的答案,但您不必输入目录的名称。我在我的.profile 中设置了一个名为rvm_trust 的别名来为我运行它。

    rvm rvmrc warning ignore `pwd`/.rvmrc
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-26
      • 1970-01-01
      • 2012-01-29
      相关资源
      最近更新 更多