First, install RVM from https://rvm.io/ with these instructions.
Workflow is as follows, where some_name is a token name for your environment and some_software is rails for example:
rvm gemset create some_name
rvm gemset use some_name
gem install some_software .gems
rvm gemset export some_name
RVM can import a Gemfile thusly:
rvm gemset import some_name.gems