I’m a novice with capistrano, and I’m going to deploy my app in linode on SO ubuntu 10.04 lucid 64 bits.
I’m trying to make my deploy with capistrano gem, but I get the error:
[000.00.000.00] executing command
[000.00.000.00] rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'default' -c 'cd /home/user/project/current; git fetch origin; git reset --hard master'
** [out :: 109.74.195.41] bash: /home/user/.rvm/bin/rvm-shell: No such file or directory
command finished in 330ms
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'default' -c 'cd /home/user/project/current; git fetch origin; git reset --hard master'" on 000.00.000.00
ubuntu@ubuntu:~/Desktop/project$
This is my deploy.rb
# RVM
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :rvm_ruby_string, 'default'
set :rvm_type, :user
# Bundler
require "bundler/capistrano"
# General
set :application, "project"
set :user, "user"
set :deploy_to, "/home/user/project"
set :deploy_via, :copy
set :use_sudo, false
# Git
set :scm, :git
set :repository, "~/project/.git"
set :branch, "master"
# VPS
role :web, "my vps ip"
role :app, "my vps ip"
role :db, "my vps ip", :primary => true
set :server, :nginx
require 'capistrano_recipes'
I have installed nginx and I want to use unicorn with nginx.
I have a directory created in home/user/project in remote vps to deploy my application there.
My ruby version in vps remote host is:
ruby 1.9.2p318 (2012-02-14 revision 34678) [x86_64-linux]
Can anyone help shed some light on what I’m doing wrong?
RVM (head or 1.11.0) now supports tasks for installing RVM/Ruby, I have an article to describe the process http://niczsoft.com/2012/03/fast-deployment-using-capistrano-rvm-and-more/
You can find my deploy.rb here: https://github.com/mpapis/ad/blob/master/config/deploy.rb
And here is description on RVM site: http://beginrescueend.com/integration/capistrano/
Also worth mentioning are the new file formats not requiring trusting: http://beginrescueend.com/workflow/projects/#ruby-versions