我无法让 rvm 读取我的项目特定 .rvmrc [英] I cannot get rvm to read my project specific .rvmrc

查看:43
本文介绍了我无法让 rvm 读取我的项目特定 .rvmrc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很平静(回复:rbenv),但我对 rvm & 感到非常沮丧.rvmrc.我一直遇到问题,我 cd 到我的项目文件夹中,却发现我的 ruby​​ &gemset 环境未正确设置.那么有人可以一劳永逸地告诉我如何为我的项目创建一个合适的 .rvmrc.

I come in peace (re: rbenv) but I am super frustrated with rvm & .rvmrc. I keep on running into issues where I cd into my project folder only to find that my ruby & gemset environment has not been set correctly. So can someone once and for all tell me how to create a proper .rvmrc for my project.

我已经尝试了我所知道的两种方式:

I have tried both ways that I know of:

  1. 创建一个 .rvmrc 并将rvm use 1.9.2@GEMSET"放入其中(有时有效,有时无效)
  2. 使用 rvm --create --rvmrc 1.9.2@GEMSET 命令行工具创建了一个更精巧的 .rvmrc,但 cd 到我的项目文件夹中仍然没有给我想要的结果.

这个问题是不稳定的.我会说我正在两台不同的机器上工作并通过 Dropbox 同步我的项目文件夹.那么这可能是 rvm 无法验证文件夹并因此忽略 .rvmrc 的问题吗?

This problem is erratic. I will say that I am working on two different machines and syncing my project folder via Dropbox. So could this be a problem where rvm cannot verify the folder and therefore ignores the .rvmrc?

任何帮助将不胜感激.

推荐答案

您可能需要设置

rvm_project_rvmrc=1

在获取 rvm 脚本之前的 shell 配置中,例如:

in your shell config before the rvm scripts are sourced, e.g.:

rvm_project_rvmrc=1
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

这篇关于我无法让 rvm 读取我的项目特定 .rvmrc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆