class GemHadar
def rvm_task
The generated file is written using the secure_write method to ensure
- Switch to using that gemset
- Create the gemset specified by the rvm.gemset accessor
- Use the Ruby version specified by the rvm.use accessor
This task generates a .rvmrc file in the project root directory with commands to:
specified Ruby version and gemset for the project.
The rvm_task method creates a .rvmrc file that configures RVM to use the
def rvm_task desc 'Create .rvmrc file' task :rvm do secure_write('.rvmrc') do |output| output.write <<~EOT rvm use #{rvm.use} rvm gemset create #{rvm.gemset} rvm gemset use #{rvm.gemset} EOT end end end