开发者

rvmrc file not working

I have created a gemset named rails2ruby192 and i have added below code in my .rvmrc file in root directory but it is not loading the gemset.

ruby-1.9.2-p180@rail开发者_StackOverflow中文版s2ruby192 


RocketR is correct. However, the more 'correct' way would be to:

cd into your project directory and run the command:

rvm --rvmrc --create use 1.9.2-p180@rails2ruby192

in the root directory of your project. This will create an .rvmrc for the project in that directory, create AND use the gemset if it does not already exist.

Also, this method, nor the one you chose, will 'trust' the newly generated .rvmrc file. For that, you will need to do an:

rvm reload

while in that directory, at which time RVM will reload itself, see the .rvmrc and see that it is not trusted and give you the change to review it and trust it. The reason for using the 'rvm reload' command is that it forces a whole slew of things to take place to structure and stabilize the environment for that particular project to include reloading itself, reloading the .rvmrc (to ensure you are using the right pathings and variables for that gemset), checking to see if the .rvmrc is trusted or not, and then giving you the option To trust it. Should you say yes, it will then finish up by loading the selected ruby@gemset completely.


Try rvm use ruby-1.9.2-p180@rails2ruby192 instead


To change the trust level to execute .rvmrc file when entering a folder I used

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

As seen in this SO answer

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜