How to manage multiple gemsets and ruby versions with RVM?

"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!

Here is how I like to do it Install a ruby with RVM Switch to/use that ruby Create a gemset for a project Switch to/use that gemset Install gems needed create an alias that points to my chosen ruby & gemset switch to/use that new alias (again, associated w/ a project) Do this as many times necessary for your different projects that you want to keep separate from eachother Example: $ rvm install ruby-1.9.2 ... $ rvm list rvm rubies => ree-1.8.7-head i386 ruby-1.9.2-head i386 ruby-1.9.2-preview3 i386 $ rvm use ruby-1.9.2-preview3 info: Using ruby 1.9.2 preview3 $ rvm gemset create my_project info: Gemset 'my_project' created. Rvm gemset use my_project info: Now using gemset 'my_project' $ gem install httparty When you HTTParty, you must party hard! Successfully installed crack-0.1.8 Successfully installed httparty-0.6.1 2 gems installed $ rvm alias create my_project ruby-1.9.2-preview3@my_project info: Creating alias my_project for ruby-1.9.2-preview3@my_project.

Info: Recording alias my_project for ruby-1.9.2-preview3@my_project. $ rvm use my_project info: Using ruby 1.9.2 preview3 with gemset my_project $ Now I have an entire environment dedicated to a particular project. This is great because I can experiment with all sorts of different gems/versions without worrying about stomping all over other projects that have very specific requirements Good luck!

Here is how I like to do it... Install a ruby with RVM Switch to/use that ruby Create a gemset for a project Switch to/use that gemset Install gems needed create an alias that points to my chosen ruby & gemset switch to/use that new alias (again, associated w/ a project) Do this as many times necessary for your different projects that you want to keep separate from eachother. Example: $ rvm install ruby-1.9.2 ... $ rvm list rvm rubies => ree-1.8.7-head i386 ruby-1.9.2-head i386 ruby-1.9.2-preview3 i386 $ rvm use ruby-1.9.2-preview3 info: Using ruby 1.9.2 preview3 $ rvm gemset create my_project info: Gemset 'my_project' created. Rvm gemset use my_project info: Now using gemset 'my_project' $ gem install httparty When you HTTParty, you must party hard!

Successfully installed crack-0.1.8 Successfully installed httparty-0.6.1 2 gems installed $ rvm alias create my_project ruby-1.9.2-preview3@my_project info: Creating alias my_project for ruby-1.9.2-preview3@my_project. Info: Recording alias my_project for ruby-1.9.2-preview3@my_project. $ rvm use my_project info: Using ruby 1.9.2 preview3 with gemset my_project $ .... Now I have an entire environment dedicated to a particular project.

This is great because I can experiment with all sorts of different gems/versions without worrying about stomping all over other projects that have very specific requirements. Good luck!

– Anand Sep 14 '10 at 15:21 Thanks a ton Brian - I fully understood now - the workflow and the gemset concept...thank a lot again – Anand Sep 14 '10 at 15:26 Glad it helped. It took me a little bit to 'get it' as well. Now, I can't live without it... Which reminds me, I should probably go donate to the RVM project... – Brian Sep 14 '10 at 16:06 I didn't know about the alias part of the workflow.

You just saved me some serious typing. Also, from what i've recently discovered, when you update rvm, it may point to another head version of your ruby, eg rvm use jruby used to point to 1.5.0 but now points to 1.5.2 so if you have a project setup to use 1.50, now you have to type rvm use jruby-1.5.0 so if you setup an alias make sure you use the full ruby description or it may not find your gemset after updating. – Jed Schneider Sep 14 '10 at 18:39.

Multiple gemsets is managed (without quotes):. Manage multiple gemsets.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions