capistrano3

Error running cron job `require': cannot load such file — bundler/setup (LoadError)

假装没事ソ 提交于 2020-02-24 05:27:32
问题 I have deployed application using Capistrano 3. I keep on getting following error. `require': cannot load such file -- bundler/setup (LoadError) Here is the cron tab list 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

Capistrano 3 deploy fails connecting to GitHub - Permission denied (publickey)

萝らか妹 提交于 2020-01-24 06:42:27
问题 I have the following deploy script set up with Capistrano v3 and capistrano/symfony gem. I am deploying to an AWS EC2 instance with Ubuntu 14.4 I am connecting with a .pem file downloaded from AWS. I have the following in my deploy.rb set :pty, true set :ssh_options, { user: 'ubuntu', keys: ['/Users/myuser/Sites/Myproject.pem'], forward_agent: true, auth_methods: ["publickey"] } when deploying with bundle exec cap staging deploy --trace The script connects fine but fails on this INFO

Capistrano destination path already exists, not an empty directory

≡放荡痞女 提交于 2020-01-24 03:26:08
问题 While deploying a Rails app with Capistrano on Ubuntu 14.04, I am getting the following error: fatal: destination path '/var/www/APP-NAME/repo' already exists and is not an empty directory. cf5a389e] Running /usr/bin/env [ -f /var/www/rd/repo/HEAD ] on LINODE-INSTANCE-IP DEBUG[cf5a389e] Command: [ -f /var/www/rd/repo/HEAD ] DEBUG[cf5a389e] Finished in 0.005 seconds with exit status 1 (failed). DEBUG[8899b95c] Running /usr/bin/env if test ! -d /var/www/rd; then echo "Directory does not exist '

How to get Capistrano 3 to use RVM ruby?

a 夏天 提交于 2020-01-23 08:18:03
问题 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

How to get Capistrano 3 to use RVM ruby?

允我心安 提交于 2020-01-23 08:17:25
问题 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

Bundler with Capistrano doesn't generate a binary for DelayedJob

放肆的年华 提交于 2020-01-22 19:39:38
问题 I'm using Bundler for a Rails app deployed by Capistrano. I'm trying to add the DelayedJob gem, but the bin/delayed_job file is missing from the remote server after I do a deploy. It exists on my local machine. I tried manually creating it with bundle binstubs delayed_job but it fails with: There are no executables for the gem delayed_job. What am I missing here? The gems in question are: Bundler 1.3.5, Capistrano 3.1.0, DelayedJob 4.0.0, Rails 4.0.2 EDIT: Here is my full Gemfile: http:/

date time directory name global variable in capistrano

南笙酒味 提交于 2020-01-17 04:46:23
问题 How can I make a datetime global directory variable in Capistrano 3? Basically the scenario is: I want to create that variable before deploy start and make it available to other tasks. The value of the variable is date and time. So that will be used for backup tasks. How is it possible? Thanks in advance. 回答1: In your deploy.rb, you can set a variable ( set :my_datetime, Time.now ) and then use it elsewhere ( fetch :my_datetime ). 来源: https://stackoverflow.com/questions/34645995/date-time

Capistrano 3 runs every command twice (new install) - Configuration issue

空扰寡人 提交于 2020-01-14 12:16:08
问题 I just completed my capistrano installation for the first time. Most of everything is left to default settings, I configured my server, its authentification, and the remote folder, as well as the access to my git repository. I use capistrano to deploy php code to my server. cap staging deploy and cap production deploy function, but they run every command twice . It sometimes causes problems when those tasks are executed too quickly on the server, returning error codes, which stops the

How can I get passenger-config restart-app to work?

删除回忆录丶 提交于 2020-01-13 09:24:08
问题 Rails 4.1 on Ubuntu 14.04 with rbenv and ruby 2.2.1. Using capistrano with the capistrano-passenger gem, but the restart at the end fails: INFO [8213c63a] Running /usr/bin/env passenger-config restart-app /home/deployer/my_app --ignore-app-not-running as deployer@mysite.com DEBUG [8213c63a] Command: passenger-config restart-app DEBUG [8213c63a] Please pass either an app path prefix or an app group name. See --help for more information. When I try to run this command at the command line via

Capistrano 3 change ssh_options inside task

戏子无情 提交于 2020-01-10 03:03:26
问题 I trying to run capistrano v.3 task in same stage with diferent ssh_options. my production.rb say: set :stage, :production set :user, 'deploy' set :ssh_options, { user: 'deploy' } With this configuration capistrano connect with user deploy which is correct for the rest of taks. But I need connect it for one specific task with an_other_user wich is well configured in server. Then my recipe say: ... tasks with original user ... task :my_task_with_an_other_user do set :user, 'an_other_user' set