Rvm/capistrano

When I ran cap deploy:setup, the following actually installed rvm,
ruby and the online_store gemset on my staging server:

set :rvm_ruby_string, ‘[email protected]_store’
set :rvm_autolibs_flag, “read-only”

set :rvm_type, :system
set :rvm_install_with_sudo, true

before ‘deploy:setup’, ‘rvm:install_rvm’ # install RVM
before ‘deploy:setup’, ‘rvm:install_ruby’ # install Ruby and create
gemset, OR:
before ‘deploy:setup’, ‘rvm:create_gemset’ # only create gemset

Now that’s what you would expect. However, I already had rvm, ruby
installed on my server, and all I wanted installed was the gemset
called online_store. So why was this unable to detect that rvm and
ruby was already installed?

On Tuesday, May 14, 2013 10:56:10 AM UTC-4, John M. wrote:

before ‘deploy:setup’, ‘rvm:install_rvm’ # install RVM
before ‘deploy:setup’, ‘rvm:install_ruby’ # install Ruby and create
gemset, OR:
before ‘deploy:setup’, ‘rvm:create_gemset’ # only create gemset

Now that’s what you would expect. However, I already had rvm, ruby
installed on my server, and all I wanted installed was the gemset
called online_store. So why was this unable to detect that rvm and
ruby was already installed?

my guess is that you had an older version of RVM and an older patch of
Ruby. Whenever you run cap deploy:setup on the above code, it’s going
to
do two things:

  1. Update RVM to the current stable version (if the installed version
    isn’t current)
  2. Install the latest stable version of Ruby. Note, this is an
    install,
    not an update. It will leave older versions in the repository. To RVM,
    1.9.3-p0 is different from 1.9.3-p194. If you run the above and
    1.9.3-p0
    was installed on the server, it will now install 1.9.3-p194 and both
    will
    be installed (and available).