草庐IT

Capistrano

全部标签

ruby-on-rails - Capistrano 错误

执行后capdeploy:setup我收到这个错误failed:"sh-c'sudo-p'\\''sudopassword:'\\''mkdir-p/u/apps/blog/u/apps/blog/releases/u/apps/blog/shared/u/apps/blog/shared/system/u/apps/blog/shared/log/u/apps/blog/shared/pids'"onfoobar.com这是我的deploy.rb的内容require'capistrano'#AccountSettingsset:user,"user"set:password,"pas

ruby-on-rails - 部署后缺少 gem (Ruby、Ruby on Rails、Capistrano)

我正在创建一个Rails应用程序。我通过Capistrano部署到vps服务器,运行以下部署命令:$bundleexeccapdevelopmentdeploy部署看起来很成功,但缺少一些精华。ThefollowinggemsaremissingDEBUG[16b13d82]*debug_inspector(0.0.3)*web-console(3.1.1)DEBUG[16b13d82]*spring(1.7.2)*spring-watcher-listen(2.0.0)DEBUG[16b13d82]*rails-controller-testing(0.1.1)DEBUG[16b13

ruby - Capistrano 可以根据角色设置变量吗?

我正在尝试使用Capistrano部署到两个不同的角色,在两个角色上都使用Bundler,但是Bundler命令和标志会有所不同。是否可以设置特定于角色的变量?要么是这样的:set:bundle_flags,"--deployment--quiet",:role=>"web"或:role:webdoset:bundler_cmd,"--deployment--quiet"end当然,这两个选项都行不通。有什么办法可以做到这一点,或类似的东西吗? 最佳答案 无法为每个角色设置自定义变量值。您可以改为使用capistrano-ext中的

ruby - Capistrano:使用参数调用任务(内部)

我有这个代码namespace:mysqldotask:change_passworddorun"mysqladmin-u#{user}-p#{old}password#{new}"endend我想用它来更改多个用户的密码。我如何使用参数而不是从命令行执行此任务。下一个实现会很棒。task:change_passwordsdomysql.change_password('user1','oldpass','newpass');mysql.change_password('user2','oldpass','newpass');mysql.change_password('user3',

ruby - Capistrano 部署错误 : Stage not set

我关注了this设置rvm、ruby、rails、nginx和passenger的教程。然后我安装了capistrano和node.js。现在,一切正常,直到我尝试部署*test_app.*capdeploy:setup产生以下错误:[deprecated]I18n.enforce_available_localeswilldefaulttotrueinthefuture.IfyoureallywanttoskipvalidationofyourlocaleyoucansetI18n.enforce_available_locales=falsetoavoidthismessage.S

ruby - 如何在脚本失败(错误)时继续并使用 Capistrano 3 捕获输出

在Capistrano2.x中你可以简单地添加:on_error=>:continue像这样:task:bad_script,:on_error=>:continuedomy_error=capture('/path/to/tomcat/shutdown.sh')end我看不到在Capistrano3.x或ssh-kit(底层通信)中执行此操作的任何方法。任何帮助将不胜感激。task:bad_scriptdoserver_is_downonroles:alldobeginserver_is_down=capture('/path/to/tomcat/shutdown.sh')rescu

ruby - 使用 Sidekiq、Capistrano、Sinatra 进行部署

作为使用Sinatra部署capistrano的一部分:*executing`sidekiq:start'*executing"cd/var/www/nodes/current;nohupbundleexecsidekiq-eproduction-C/var/www/nodes/current/config/sidekiq.yml-P/var/www/nodes/current/tmp/pids/sidekiq.pid-r/var/www/nodes/current/app/nodes.rb>>/var/www/nodes/current/log/sidekiq.log2>&1&"无论

ruby-on-rails - Capistrano 没有正确重启 Mongrel 集群

我有一个在nginx下运行的由三个杂种组成的集群,我使用Capistrano2.4.3部署应用程序。当我在有正在运行的系统时“capdeploy”时,行为是:应用已部署。代码已成功更新。在capdeploy输出中,有这样的:执行“sudo-p'sudo密码:'mongrel_railscluster::restart-C/var/www/rails/myapp/current/config/mongrel_cluster.yml"服务器:["myip"][myip]执行命令**[out::myip]停止端口9096**[out::myip]停止端口9097**[out::myip]停止

ruby - Capistrano错误: could not connect to ssh-agent

我在Capistrano部署中使用了基岩。当我使用bundleexeccapstagingdeploy:check命令时,出现身份验证错误:...D,[2015-05-09T15:39:53.878464#15636]DEBUG--net.ssh.authentication.session[1e34a58]:tryingpublickeyD,[2015-05-09T15:39:53.878464#15636]DEBUG--net.ssh.authentication.agent[1e30d2c]:connectingtossh-agentE,[2015-05-09T15:39:53.

ruby - Capistrano 3/SSHKit 在自定义任务中写入文件

我想用我的发布号标记当前部署的目录。我试过这种方法:Getlocallytheappversion,storeitintoavariable,andontheremotehost,storeitinafile.namespace:deploydodesc"Setareleasenumberastheappversion"task:mark_releasedorelease_number=`gitdescribe`onroles(:web)doexecute("echo#{release_number}>#{current_path}/RELEASE")endendend问题是,当我通过