How can I get rvm to create my gemset when deploying capistrano?

I am trying to use capistrano to create a gemset rvm.

I am using rvm-capistrano stone.

Even I am explicitly trying to create it during setup, the capistrano shell command looks like this:

rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell ' 1.9.3-p194@vatax ' -c 'rvm use 1.9.3-p194@vatax --create' 

which obviously fails with an error message:

 Gemset 'vatax' does not exist, 'rvm gemset create vatax' first, or append '--create' 

In fact, I expected the stone to be able to create a gemset for me, but if not at least I would like to use a non-rvm shell to create a gemset inside capistrano.

+6
source share
3 answers

This is not yet supported in the gem, there is a ticket to add support for it - https://github.com/wayneeseguin/rvm-capistrano/issues/8

Now you can use the task installing ruby, also takes care of creating a gemset, when the ruby ​​is already installed, it will just create a gemset:

 before 'deploy', 'rvm:install_ruby' 

You can find more detailed information in the RVM docs: https://rvm.io/integration/capistrano/

+5
source

It looks like in 2013-01-07 you can do this:

 before 'deploy', 'rvm:create_gemset' 

See https://github.com/wayneeseguin/rvm-capistrano/issues/8

+4
source

I usually create a gemset for every application that I deploy, so I need to create several gemset. Here is how I do it:

 set :application, 'my-application-name' set :user, 'my-username' run "~#{user}/.rvm/bin/rvm gemset create #{application}" 
0
source

Source: https://habr.com/ru/post/915122/


All Articles