Capistrano – cannot deploy to develop serwer

I have Spree shop on my production serwer. I would like create develop machine to test application. On my production serwer i have cappistrano + passanger.

I define task in ./config/deploy.rb for deploy on my develop serwer. It code looks like this:

require "delayed/recipes"

set :application, "shop-test"

#set :user, "test"
# set :deploy_to, "/home/test/#{application}"
set :keep_releases, 10

#set :use_sudo, false

set :scm, "git"
set :repository, "git@bitbucket.org:cvjbd/test-shop.git"


#set :rvm_ruby_string, "ruby-1.9.3-p429@test"
set :rvm_type, :user

set :rake,           "rake"

require 'rvm/capistrano'

desc "Setup staging vars"
task :develop do
  role :app, "IP_ADDRESS"
  role :web, "IP_ADDRESS"
  role :db, "IP_ADDRESS", :primary => true

  set :deploy_to, "/root/test/#{application}"
  set :branch, "master"
  set :rails_env, "staging"
  set :user, "test"
  set :use_sudo, true
  set :rvm_ruby_string, "ruby-1.9.3-p551@test"
end

before ‘deploy’, ‘rvm:install_ruby’

Do you have any idea how to fix this???

when i run cappistrano like this: cap develop deploy i get error:

servers: ["IP_ADDRESS"]

test@IP_ADDRESS’s password:
[IP_ADDRESS] executing command
* [err :: IP_ADDRESS] bash: /home/test/.rvm/bin/rvm: No such file or directory
*
[err :: IP_ADDRESS] bash: /home/test/.rvm/bin/rvm: No such file or directory


Source: bash

Leave a Reply