You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
namespace :rake_tasks do
# Use an argument with the Cape block, if you want to or need to.
Cape do |cape|
cape.mirror_rake_tasks :db, :roles => :app do |env| # Only mirror the :db tasks in Rake, and set the RAILS_ENV variable
env['RAILS_ENV'] = deploy_env
end
end
end
...
before 'deploy:assets:precompile', 'deploy:symlink_database'
after 'deploy:symlink_database', 'deploy:migrate'
after 'deploy:migrate', 'rake_tasks:db:seed'
...
but when it seems the mirror rake tasks "db:seed" cannot be run under ${current_path}, because at that time, the current symlink has not been created. see the log:
...
triggering after callbacks for `deploy:update_code'
* executing `deploy:assets:precompile'
triggering before callbacks for `deploy:assets:precompile'
* executing `deploy:symlink_database'
* executing "ln -s /usr/website/rosettareader/shared/db/production.sqlite3 /usr/website/rosettareader/releases/20120920195322/db/production.sqlite3"
servers: ["dragon"]
[dragon] executing command
command finished in 310ms
triggering after callbacks for `deploy:symlink_database'
* executing `deploy:migrate'
* executing "cd /usr/website/rosettareader/releases/20120920195322 && bundle exec rake RAILS_ENV=production db:migrate"
servers: ["dragon"]
[dragon] executing command
command finished in 10669ms
triggering after callbacks for `deploy:migrate'
* executing `rake_tasks:db:seed'
* executing "cd /usr/website/rosettareader/current && /usr/bin/env bundle exec rake db:seed RAILS_ENV=\"production\""
servers: ["dragon"]
[dragon] executing command
*** [err :: dragon] bash: line 0: cd: /usr/website/rosettareader/current: No such file or directory
command finished in 313ms
*** [deploy:update_code] rolling back
* executing "rm -rf /usr/website/rosettareader/releases/20120920195322; true"
servers: ["dragon"]
[dragon] executing command
command finished in 359ms
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.2-p320' -c 'cd /usr/website/rosettareader/current && /usr/bin/env bundle exec rake db:seed RAILS_ENV=\"production\"'" on dragon
See:
*** [err :: dragon] bash: line 0: cd: /usr/website/rosettareader/current: No such file or directory
So how can I run a mirrorred rake tasks under ${release_path}?
The text was updated successfully, but these errors were encountered:
Hi,
I have this in my
config/deploy.rb
file:but when it seems the mirror rake tasks "db:seed" cannot be run under
${current_path}
, because at that time, thecurrent
symlink has not been created. see the log:See:
So how can I run a mirrorred rake tasks under
${release_path}
?The text was updated successfully, but these errors were encountered: