Created
July 10, 2012 15:47
-
-
Save mrchrisadams/3084229 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
Capistrano::Configuration.instance.load do | |
namespace :deploy do | |
namespace :amee do | |
namespace :ss3 do | |
desc "[internal] Copies ss3.yml file to app servers" | |
task :upload, :except => { :no_release => true } do | |
ss3_path = Rails.root.join("config", "ss3.yml") | |
# this errors out like so: | |
# gems/capistrano-2.11.2/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task': wrong number of arguments (2 for 0) (ArgumentError) | |
upload (ss3_path), "#{shared_path}/config/ss3.yml" | |
# this works | |
put (File.read(ss3_path)), "#{shared_path}/config/ss3.yml" | |
end | |
desc "[internal] Updates the symlink for ss3.yml to the just deployed release." | |
task :symlink, :except => { :no_release => true } do | |
run "ln -nfs #{shared_path}/config/ss3.yml #{release_path}/config/ss3.yml" | |
end | |
end | |
end | |
end | |
end |
Thanks a lot. Made me mad for 15 minutes but after reading this gist it is a relief.
This helped me too. It was working perfectly until I refactored my local asset precompile task out to a Capistrano recipes gem. Using top.upload fixed the issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A life save, thanks ;-)