开发者

I cannot get rvm to read my project specific .rvmrc

开发者 https://www.devze.com 2023-03-30 17:48 出处:网络
I come in peace (re: rbenv) but I am super frustra开发者_StackOverflow中文版ted with rvm & .rvmrc.I keep on running into issues where I cd into my project folder only to find that my ruby & ge

I come in peace (re: rbenv) but I am super frustra开发者_StackOverflow中文版ted 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. creating a .rvmrc and putting 'rvm use 1.9.2@GEMSET' in there (this works sometimes and sometimes not)
  2. using the rvm --create --rvmrc 1.9.2@GEMSET command line tool which creates a more ellaborate .rvmrc but cd'ing into my project folder is still not giving me the desired result.

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?

Any help will be greatly appreciated.


Every time you enter a project directory after changing its .rvmrc file, rvm will prompt you for accepting or not the new file. If you want to change your decision afterwards, you should use rvm rvmrc command:

rvm rvmrc {trust,untrust,trusted,load,reset}


You may need to set

rvm_project_rvmrc=1

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"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号