Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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@rails2ruby192 
like image 796
persian Avatar asked Jul 16 '11 19:07

persian


2 Answers

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.

like image 66
ddd Avatar answered Oct 25 '22 07:10

ddd


Try rvm use ruby-1.9.2-p180@rails2ruby192 instead

like image 32
RocketR Avatar answered Oct 25 '22 07:10

RocketR