Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Capistrano 3在部署后不会重新启动我的rails应用程序_Ruby On Rails_Capistrano - Fatal编程技术网

Ruby on rails Capistrano 3在部署后不会重新启动我的rails应用程序

Ruby on rails Capistrano 3在部署后不会重新启动我的rails应用程序,ruby-on-rails,capistrano,Ruby On Rails,Capistrano,我使用以下deploy.rb: # config valid only for current version of Capistrano lock '3.4.0' set :application, '*****' set :rails_env, 'production' set :repo_url, 'admin@test.*******.***:/srv/outils/repos/*****' set :scm, :git namespace :deploy do after :r

我使用以下deploy.rb:

# config valid only for current version of Capistrano
lock '3.4.0'
set :application, '*****'
set :rails_env, 'production'
set :repo_url, 'admin@test.*******.***:/srv/outils/repos/*****'
set :scm, :git

namespace :deploy do

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
      # Here we can do anything such as:
      # within release_path do
      #   execute :rake, 'cache:clear'
      # end
    end
  end
  #after 'deploy:publishing', 'deploy:restart'
end
after 'deploy:publishing', 'deploy:restart'

它会正确部署应用程序,但不会重新启动应用程序。我应该修改什么使其重新启动?没有关于重新启动的消息、错误或其他信息。

在Capistrano 3中,
重新启动任务可用并将被调用,但它是空的。有关代码,请参阅中的Capistrano源代码:

[...]

  task :restart
  task :failed

end
如果希望
重新启动
任务实际执行某些操作,可以通过将此代码添加到
部署.rb
来更改
重新启动
的默认行为:

namespace :deploy do
  task :restart do
    invoke rake-restart-something-task
  end
end

其中,
rake restart something任务
可以是类似于
deploy:service:restart\u apache
,或者是您在capistrano rake文件中定义的其他任务。

在capistrano 3中,
restart
任务可用并将被调用,但它是空的。有关代码,请参阅中的Capistrano源代码:

[...]

  task :restart
  task :failed

end
如果希望
重新启动
任务实际执行某些操作,可以通过将此代码添加到
部署.rb
来更改
重新启动
的默认行为:

namespace :deploy do
  task :restart do
    invoke rake-restart-something-task
  end
end

其中,
rake restart something任务
可以是类似于
deploy:service:restart\u apache
,或者您在capistrano-rake文件中定义的其他任务。

您使用的是哪个Web服务器?您使用的是哪个Web服务器?