Tag: capistrano3

capistrano 3 + rvm1-capistrano3 rails 4.1 secrets.yml环境变量问题

我一直在使用capistrano 3部署rails 4.1应用程序。它一直工作正常。 但是当我尝试做rake任务时(取消注释需要’capistrano / rails / assets’)。 我收到这个错误 cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host xxx.xxx.xxx.xxx: rake exit status: 1 rake stdout: Nothing written rake stderr: config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly: * development – set it to false * test – set it to false (unless you […]

在Capistrano部署之后,Rails资产没有编译

我正在使用Capistrano部署我的Rails应用程序,似乎资产没有被编译,除非我进入服务器并运行RAILS_ENV=development bundle exec rake assets:precompile手动RAILS_ENV=development bundle exec rake assets:precompile 。 我已经尝试按照capistrano / rails github页面上的说明进行操作,但我不确定我是否错过了某些内容。 运行cap production deploy成功完成。 但我不知道如何检查assets:precompile任务是否实际运行。 运行cap production deploy:assets:precompile也成功完成,但服务器上没有明显变化。 版本 Server version: Apache/2.4.7 (Ubuntu) Phusion Passenger 5.0.22 ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux] Rails 4.2.5 capistrano (3.1.0) capistrano-bundler (1.1.4) capistrano-rails (1.1.6) capistrano-rbenv (2.0.4) Capfile require ‘capistrano/setup’ require ‘capistrano/deploy’ require ‘capistrano/rbenv’ require ‘capistrano/rails/assets’ Dir.glob(‘lib/capistrano/tasks/*.cap’).each […]

Capistrano-Puma没有启动Puma Server

问题面临 当我运行bundle exec cap production puma:start ,我得到了Puma成功启动的响应: DEBUG [e4382d1e] * Pruning Bundler environment DEBUG [e4382d1e] DEBUG [e4382d1e] [2599] Puma starting in cluster mode… DEBUG [e4382d1e] DEBUG [e4382d1e] [2599] * Version 3.0.2 (ruby 2.2.1-p85), codename: Plethora of Penguin Pinatas DEBUG [e4382d1e] DEBUG [e4382d1e] [2599] * Min threads: 0, max threads: 16 DEBUG [e4382d1e] DEBUG [e4382d1e] [2599] […]

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

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

Capistrano无法创建符号链接:文件存在

我有Capistrano 3的Rails 4应用程序。 # deploy.rb set :application, ” set :user, ” set :repo_url, ” set :branch, ‘master’ ask :branch, proc { `git rev-parse –abbrev-ref HEAD`.chomp } set :deploy_to, “/home/#{fetch :user}/apps/#{fetch :application}” set :scm, :git set :format, :pretty set :log_level, :debug set :pty, true set :linked_files, %w{config/application.yml} set :linked_dirs, %w{bin log tmp vendor/bundle public/system public/deploy} # […]

运行cron job`require’时出错:无法加载此类文件 – bundler / setup(LoadError)

我已经使用Capistrano 3部署了应用程序。我一直在跟踪错误。 `require’: cannot load such file — bundler/setup (LoadError) 这是cron选项卡列表 PATH=/home/deploy/magnificent/shared/bundle/ruby/2.2.0/bin:/usr/local/rvm/gems/ruby-2.2.2/bin:/usr/local/rvm/gems/ruby-2.2.2@global/bin:/usr/local/rvm/rubies/ruby-2.2.2/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games * * * * * /bin/bash -l -c ‘cd /home/deploy/magnificent/releases/20150830045359 && bin/rails runner -e production ‘\”Document.process_pending’\” >> log/cron_standard.log 2>> log/cron_error.log’ 和schedule.rb env :PATH, ENV[‘PATH’] set :output, { error: ‘log/cron_error.log’, standard: ‘log/cron_standard.log’} every 1.minutes do runner ‘Document.process_pending’ end 请注意,所有gem都安装在default gemset中

Capistrano在ssh登录后更改用户 – 作为另一个用户部署

在我的staging.rb文件中,我需要连接“ubuntu”用户名 server ‘**.**.****.**’, user: ‘ubuntu’, roles: %w{web app db} 在我的deploy.rb中 set :deploy_to, -> { “/var/www/myuser/myuser.com/capi” } 服务器 var/www/myuser/myuser.com# ls -la total 32 drwxrwx— 8 myuser myuser 4096 Jul 9 14:54 . drwxrwx— 5 myuser myuser 4096 Feb 26 17:18 .. drwxrwx— 7 myuser myuser 4096 May 7 13:48 beta drwxr-xr-x 2 myuser myuser 4096 Jul […]

如何让Capistrano 3使用RVM ruby​​?

的Gemfile: gem ‘capistrano’, ‘~> 3.0.0’ gem ‘capistrano-rails’ gem ‘capistrano-bundler’ gem ‘capistrano-rvm’ gem ‘capistrano3-puma’ Deploy.rb: set :rvm_type, :user set :rvm_ruby_version, ‘2.1.1’ set :default_env, { rvm_bin_path: ‘~/.rvm/bin’ } Production.rb namespace :rails do desc “Open the rails console on primary app server” task :console do on roles(:app), primary: true do execute_interactively “#{current_path}/script/rails console RAILS_ENV=production” end end def execute_interactively(command) […]

Capistrano 3 SSHKit :: Runner :: ExecuteError:在host 代理上执行时发生exception无法使用请求的身份对数据进行签名

我将rails应用程序部署到ubuntu服务器时遇到以下错误,我已经正确设置了ssh密钥,我可以ssh到服务器但是当我尝试做的时候我得到以下内容 cap production deploy 这是错误消息 cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host xxxxxx.xxxxxxx.xxx: agent could not sign data with requested identity 自从我之前部署以来,我无法弄清楚我做错了什么,我只需要将我的应用程序更新为我所做的更改。 自从我上次部署以来,我没有更改deploy.rb,Capfile或deploy / production.rb文件

Rails Capistrano 3 – 如何将production.log文件共享到Capistrano的共享文件夹中?

我正在使用Capistrano 3与我的Rails应用程序进行部署。 问题是每次我将我的应用程序部署到服务器时都会重置./log/production.log文件。 我听说可以将production.log文件放入共享文件夹并在每个部署中附加。 我认为这是由Capistrano默认制作但显然不适合我:( 有什么想法吗? 谢谢!