Skip to content

Instantly share code, notes, and snippets.

@perumal
Created July 17, 2012 14:20
Show Gist options
  • Save perumal/3129672 to your computer and use it in GitHub Desktop.
Save perumal/3129672 to your computer and use it in GitHub Desktop.
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