Created
July 17, 2012 14:20
-
-
Save perumal/3129672 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
# Basic settings: | |
# domain - The hostname to SSH to | |
# deploy_to - Path to deploy into | |
# repository - Git repo to clone from (needed by mina/git) | |
# user - Username in the server to SSH to (optional) | |
set :domain, # actual info removed | |
set :deploy_to, | |
set :repository, | |
set :user, 'deploy' | |
# set :port, '30000' | |
task :env do | |
queue %{ | |
echo "-----> Loading environment" | |
#{echo_cmd %[source "/usr/local/rvm/environments/ruby-1.9.3-p135@gemset"]} ------> this line as suggested by you didn't work hence tried the below line but still failed with the same problem | |
#{echo_cmd %[source "/usr/local/rvm/gems/ruby-1.9.3-p125@global"]} | |
} | |
end | |
desc "Deploys the current version to the server." | |
task :deploy do | |
invoke :env | |
deploy do | |
# Put things that will set up an empty directory into a fully set-up | |
# instance of your project. | |
invoke :'git:clone' | |
invoke :'bundle:install' | |
invoke :'rails:db_migrate' | |
invoke :'rails:assets_precompile' | |
to :launch do | |
queue 'touch tmp/restart.txt' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment