Support for RVM with gemset

Hi, my changes add support for rvm with gemset. Please take a look, maybe you want to merge them.

Thanks.