我想在我的 Sinatra 应用程序中运行我的 Rakefile 中包含的 rake 任务(迁移)。我正在使用 Mina 进行部署。rake migrate
如果我在服务器或开发中运行它,效果很好,但我无法让 Mina 执行任务。
我当前的部署看起来像这样config/deploy.rb
task :deploy => :environment do
deploy do
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
to :launch do
queue "sudo /opt/nginx/sbin/nginx -s reload"
end
end
end
我在部署块和启动块内都试过了queue "rake migrate"
,但它总是抱怨queue "#{rake} migrate"
bash: command not found