Comments (2)
my default env is staging.rb
#staging.rb
1 #set :strategy, Capistrano::Deploy::strategy::RsyncWithRemoteCache
2 default_run_options[:env] = {'PATH' => '/usr/local/bin:/usr/bin:$PATH'}
3 server "172.20.60.182", :app, :web, :db, :primary => true
4 set :application, "test"
5 set :application_path, "/var/www/html/classic/#{application}"
6 set :user, "user"
7 set :password, "password"
8 set :scm, :git
9 set :git_shallow_clone, 1
10 set :scm_verbose, true
11 ssh_options[:keys] = %w(~/.ssh/id_rsa)
12 ssh_options[:forward_agent] = true
13 set :repository, "[email protected]/current-system.git"
14 set :branch, "develop"
15 set :deploy_to, "#{application_path}"
16 set :deploy_via, :rsync_with_remote_cache
17
18 after :deploy, :migrate
19 set :mysql_db_name, "dbname"
20 set :mysql_params, "-u user -pPassword"
21 desc "Migrate database #{mysql_db_name}"
22
23 task :migrate, :roles => :db do
24 run "mysql #{mysql_params} #{mysql_db_name} < #{current_path}/sql_changes.sql"
25 end
- I tried requiring capistrano_rsync_with_remote_cache, but it throws a lot of errors.
cap deploy:setup
triggering load callbacks
* 2013-06-06 08:28:43 executing `staging'
/Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require': no such file to load --
capistrano_rsync_with_remote_cache (LoadError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/loading.rb:152:in `require'
from ./config/deploy/staging.rb:1:in `load'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/loading.rb:172:in
`load_from_file'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/loading.rb:89:in `load'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/loading.rb:86:in `load'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/loading.rb:86:in `each'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/loading.rb:86:in `load'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/ext/multistage.rb:18
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in
`instance_eval'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in
`invoke_task_directly_without_callbacks'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:25:in
`invoke_task_directly'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in
`execute_task'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:101:in
`find_and_execute_task'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/ext/multistage.rb:28
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/callback.rb:25:in `call'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/callback.rb:25:in `call'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `each'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:33:in `execute!'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:14:in `execute'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.14.2/bin/cap:4
from /usr/bin/cap:23:in `load'
from /usr/bin/cap:23
I even tried to copy the rsync_remote_with_cache strategy into my capistrano/..../strategy folder, but that didn't work either, same error even after fixing require path to 'capistrano/recipes/deploy/strategy/rsync_with_remote_cache'
Do I need to uncomment line 1?
from capistrano_rsync_with_remote_cache.
Ignore this, my environment was a mess. had ruby193 installed, gem 2.0.3 path was different than what ruby was using, it was still using OS X default Ruby gems path.
from capistrano_rsync_with_remote_cache.
Related Issues (15)
- Incompatible with Git HOT 1
- Respects ssh_options[:port] but not just plain :port HOT 1
- Does not check result of rsync command, keeps on going HOT 1
- Respect (local) branches
- Ignores the "dry-run" cli option and executes rsync unconditionally
- Doesn't work with non-standard ssh port HOT 3
- Split local code update into sub tasks HOT 4
- Configurable rsync exclusions HOT 3
- Released spiritual success to this for Capistrano v3 called Capistrano::Rsync
- Is this project deprecated / not maintened anymore ? HOT 7
- Update README
- scm :none HOT 1
- server-specific ssh port not used HOT 7
- Need to deploy from a git subdirectory (patch included)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano_rsync_with_remote_cache.