Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I make rvm create my gemset at capistrano deploy?

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

I use the rvm-capistrano gem.

Even I explicitly try to create it at setup, 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 the error message:

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

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

like image 387
Viktor Trón Avatar asked May 07 '12 18:05

Viktor Trón


1 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

For now you could use a task that installs ruby, it also takes care to create gemset, when ruby is already installed it will just create the gemset:

before 'deploy', 'rvm:install_ruby'

More information you can find in the RVM docs: https://rvm.io/integration/capistrano/

like image 70
mpapis Avatar answered Sep 25 '22 10:09

mpapis