RVM change automatically gemset per project

RVM is my preferred way of setting up ruby projects. It is very easy to have multiple gemsets, multiple versions, update your current ruby versions etc. I wanted to automate the procedure of selecting gemset per project so after a little search, I found a way to have an auto-select way.

Just create two files, the .ruby-version and .ruby-gemset inside your project-folder and set the ruby version and your gemset name, as it is in this repository. For example, if you put these specific two files from the repository, inside your project-folder, it will automatically change your rvm ruby version to ruby-2.0.0-p353 and gemset to crowdunding.

Do not forget to add them in your .gitignore, otherwise everyone with RVM will have a fit! Now when you navigate in this folder inside your console, your version and gemset will change automatically. Thanks Eleni for the tip!

comments powered by Disqus