Tag: capistrano

Capistrano不会创建puma.pid文件

我使用Capistrano来部署我的Rails应用程序。 但是,当我部署我的应用程序时,没有创建puma.pid文件,这会导致问题 – 我无法重新启动服务器或使用capistrano部署新版本 – capistrano无法停止puma ,因为puma.pid不会出现问题并假设没有puma进程正在运行。 当capistrano尝试运行另一个版本的puma时,我得到ADDRESS ALREADY IN USE错误。 这是我的deploy.rb lock ‘3.4.0’ set :application, ‘appname’ set :repo_url, ‘giturl’ set :deploy_to, ‘/home/user/appname’ set :pty, false set :linked_files, %w(config/application.yml config/database.yml) set :linked_dirs, %w(log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads) set :keep_releases, 5 set :rvm_type, :user set :rvm_ruby_version, ‘2.3.0’ set :puma_rackup, -> { File.join(current_path, ‘config.ru’) } […]

如何防止Capistrano在部署时显示密码

我最近开始使用Capistrano部署我的rails应用程序,但在我提示输入密码时,我似乎无法弄清楚在部署应用程序时如何不显示我的密码。 我收到以下警告, Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text. 我安装了这两个gem,我的密码仍然以明文forms回显。 任何帮助将不胜感激。

Rails 3.2带有乘客无限错误的资产管道

最近我将我的应用程序迁移到了3.2.1,看起来我是另一个在资产管道方面苦苦挣扎的开发人员。 一切看起来都不错,我的资产被编译并显然服务。 在我的文档的源代码中,我可以看到: 链接工作得很好。 但是,我的js或css实际上都没有加载。 我在apache日志中实际看到的唯一错误是: cache: [GET /] miss 我调整了我的apache配置,包括: XSendFile On … Header unset Last-Modified Header unset ETag FileETag None ExpiresActive On ExpiresDefault “access plus 1 year” 我与卡斯特拉诺和乘客一起部署。 有没有人遇到过这个问题?

Capistrano部署到同一服务器上的不同路径

我正在尝试使用capistrano部署我的应用程序。 但我想将我的应用程序部署到同一服务器的多个路径。例如,如果第一次运行我想将它部署到下面的路径 set :deploy_to, ‘/home/a/some_path/ 一旦完成第一个,它应该运行第二个路径 set :deploy_to, ‘/home/b/some_path/ 等等。 有什么建议我怎样才能做到这一点? 现在,我的单路径部署路径正在运行AOK。

如何在自定义capistrano任务中使用事务?

我正在编写一个自定义的capistrano任务来缩小我的javascripts,并希望通过回滚部署来处理缩小失败的情况。 我一直在阅读文档,并认为我已经想出如何做到这一点,但它不适合我。 这就是我所拥有的: desc ‘Minify all javascript files’ task :bundle, :roles => :app, :except => { :no_release => true } do on_rollback do run “rm #{current_path}/public/javascripts/all.js” puts “ROLLBACK” end transaction do run “cd #{current_path}; RAILS_ROOT=#{current_path} rake bundle:js” end end after ‘deploy:update’, ‘deploy:bundle’ 当我运行cap staging deploy:bundle并将其设置为失败时,我得到以下输出: triggering start callbacks for `staging’ * executing `staging’ triggering start […]

Rails,Slicehost,Capistrano – 部署端口问题

当我尝试通过以下方式部署我的应用时出现端口错误: cap deploy:cold 错误: ssh: connect to host domain.com port 22: Connection refused 我的deploy.rb(在适当的地方替换了敏感信息): set :user, ‘user’ set :domain, ‘domain.com’ set :application, “App Name” # file paths set :repository, “user@domain.com:git/appname.git” set :port, 9728 set :deploy_to, “/home/ruby/public_html/appname” # distribute your applications across servers (the instructions below put them) # all on the same server, definied above […]

使用master.key进行数据海洋部署的Rails 5.2:ActiveSupport :: MessageEncryptor :: InvalidMessage:ActiveSupport :: MessageEncryptor :: InvalidMessage

我已将我的Ruby on Rails应用程序从Rails 5.1.2迁移到Rails 5.2.0以使用加密的秘密。 应用程序已成功部署到Digital Ocean Ubuntu Server。 但是当我进入浏览器访问时,它会显示以下日志。 ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:206:in `rescue in _decrypt’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:184:in `_decrypt’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:157:in `decrypt_and_verify’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_file.rb:79:in `decrypt’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_file.rb:42:in `read’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:21:in `read’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:33:in `config’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:38:in `options’ /home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/core_ext/module/delegation.rb:271:in `method_missing’ (erb):12:in `’ 我使用rails credentials:edit添加了加密的秘密rails credentials:edit ,它创建了config/credentials.yml.enc和master.key 。 我还在我的ubuntu服务器上的/app_name/shared/config/上添加了master.key文件,还放置了一个env变量RAILS_MASTER_KEY 。 但仍然得到这个错误,我不知道我在这里失踪了什么。

没有找到Rails rubber-cap命令

我正在尝试使用Rubber将我的示例应用程序部署到Amazon EC2。 我也在关注Rubber的railscasts剧集。 到目前为止,我已经安装了gem,运行了vulcaznize命令,并对rubber.yml文件进行了修改。 但是,当我尝试运行Capistrano命令( cap rubber:create_staging )时,我得到了cap:command not found错误。 我试图运行rbenv rehash命令,但它再次失败,并给我一个rbenv:命令未找到。 如果您有任何想法如何解决这个问题,我会非常感激。 如果你想知道,我在Windows 7上运行。

capistrano部署后,ec2服务器中缺少puma.sock

在通过capistrano将生产ruby on rails项目部署到ec2上的实例后,我在nginx错误日志中收到以下错误。 亚马逊公共主机显示502 Bad Gateway nginx / 1.10.0(Ubuntu)。 我按照https://www.sitepoint.com/deploy-your-rails-app-to-aws/上的教程进行操作。当我运行cap生产部署时,似乎没有创建puma.sock。 2017/06/28 01:09:57 [crit] 12802#12802: *1 connect() to unix:/home/deploy/app_name/shared/tmp/sockets/puma.sock failed (2: No such file or directory) while connecting to upstream, client: 173.198.30.2, server: localhost, request: “GET / HTTP/1.1”, upstream: “http://unix:/home/deploy/app_name/shared/tmp/sockets/puma.sock:/”, host: “host” 以下是我的deploy.rb set :application, ‘app_name’ set :repo_url, ‘git@github.com:github_account/app_name.git’ # Edit this to match your repository […]

使用mina部署子目录

有没有办法通过Mina部署回购的子目录? 我已经看到人们使用自定义部署策略来实现这一目标与Capistrano,我希望能够与Mina一起做到这一点。