0

I have 2 servers I need to deploy to, one has a RVM installed in user mode the other in system mode. I can I write a deployment script for both?

In other words is there a way to set rvm_type to:user for one server and to :system for the other server?

Matteo Melani
  • 2,706
  • 2
  • 24
  • 30

2 Answers2

0

No there is no way to do it yet, but you should open a ticket for rvm-capistrano with a request for auto detection, I do not think it will be added shortly - but it's worth consideration and possibly can be implemented.

You could try this workaround:

set :rvm_path, "$(
  [ -x /usr/local/rvm/bin/rvm ] && echo /usr/local/rvm || 
  [ -x $HOME/.rvm/bin/rvm     ] && echo $HOME/.rvm     || 
  false
)"
mpapis
  • 52,729
  • 14
  • 121
  • 158
0

If you need it different because, for instance, your production server differs from the qa server, you could just define it in the deploy/.rb files, instead of the deploy.rb file. I've done this with many stage-specific settings.

Brad Corson
  • 461
  • 3
  • 7