capistrano

Puma silent crash with nginx reverse proxy

China☆狼群 提交于 2019-12-12 14:54:35
问题 I have a puma server running a ruby on rails app on an AWS EC2 instance. It was working fine for a while, but I found it responding with 502 errors a few hours later. The app is deployed with capistrano. A simple restart of puma fixed the problem temporarily, but I want to prevent it happening again. Not quite sure what to try first. Here's my capistrano puma config: set :puma_rackup, -> { File.join(current_path, 'config.ru') } set :puma_state, "#{shared_path}/tmp/pids/puma.state" set :puma

Set umask for remote commands

十年热恋 提交于 2019-12-12 11:45:14
问题 How can I direct processes started on remote machines via ssh to run with a certain umask? I want this to apply to commands run as part of standard Capistrano recipes too, so I can't just make an explicit call to "umask" part of the command. It does not appear that ~/.bash_profile on the remote machine is read, with the way that Capistrano invokes remote commands. 回答1: I was confronted to the same issue and got around it by using the then-undocumented SSHKit.config.umask in config/deploy.rb .

Trouble on migrating in production mode

孤街醉人 提交于 2019-12-12 10:23:31
问题 I am using Ruby on Rails 3.1.0 and the Capistrano gem and I created a migration file in order to change database table column names. When in my local machine I run the rake db:migrate command (in development mode) it works, but I would like to make effective these changes on the remote server in production mode. My problem is : if I run the Capistrano command cap deploy:migrate I get the following error message in the production log file on the remote server : * executing "cd /<my_application

Capistrano using sudo even with “set :use_sudo, false”

风流意气都作罢 提交于 2019-12-12 09:37:57
问题 I do not wish to use sudo for any of my remotely executed commands via Capistrano. Specifically, when I run cap deploy:setup , I'm asked for my sudo password during the first mkdir command. I added set :use_sudo, false to my deploy.rb file, but this did not make a difference. I started with a fairly complete deploy.rb file, but whittled it down once I started having issues. Here is my minimal version that still shows use_sudo not being respected: # App Definitions set :domain, '[server-ip]'

Why won't bundler install JSON gem?

北战南征 提交于 2019-12-12 07:07:58
问题 I get the following error when attempting to run cap production deploy . DEBUG [dc362284] Bundler::GemNotFound: Could not find json-1.8.1.gem for installation DEBUG [dc362284] An error occurred while installing json (1.8.1), and Bundler cannot continue. DEBUG [dc362284] Make sure that `gem install json -v '1.8.1'` succeeds before bundling. It may be important to note that this deployment was working, than I upgraded to Ruby 2.1.0 to remove an encoding error. I upgraded locally which worked

cap deploy:cold fails with 'No such file or directory - git rev-parse master' error

让人想犯罪 __ 提交于 2019-12-12 05:37:41
问题 I am trying to deploy my rails application for the first time. Server is running Ubuntu 10.4 server (64bit) Local machine is running Windows XP. Repository is at github I have successfully run cap deploy:setup but when I run cap deploy:cold I get the following error: D:\Rails\rails_apps\fx>cap deploy:cold You are running Ruby 1.8.6, which has a bug in its threading implementation. You are liable to encounter deadlocks running Capistrano, unless you install the fastthread library, which is

Type Error during capistrano deploy:setup

こ雲淡風輕ζ 提交于 2019-12-12 04:53:36
问题 I've spent about three weeks on trying to track down this error, so forgive me if this is a silly question but I'm at a total loss. I'm struggling to figure out why I can't deploy this app. I get a type error when I try to deploy:setup and deploy:check with capistrano, and I can't figure out where it might be coming from. I thought it might be a mistake I made while setting up my ssh keys. However, when I ssh to the server via the command line the ssh key setup is clearly working. I'm using

git clone stuck during a Capistrano deploy

纵饮孤独 提交于 2019-12-12 04:24:01
问题 I am currently struggling with Capistrano and Git. Here is my setup first: Production server under Windows Server 2003, msysgit installed. Development machine under Windows 7, using Aptana for development Yes, I know, Windows everywhere. But I have to deal with that for the moment. So, my problem is : during a Capistrano deploy attempt, the git clone command gets stuck. It just displays the following message, but nothing happens next. Here is the command launched by Capistrano: git clone ssh:

postmaster dead but pid file exists

╄→гoц情女王★ 提交于 2019-12-12 03:18:48
问题 We have a rails 4 application with postgres Sometimes our server hanged and if we reboot it . The server gets started but it can not connect to postgres. status shows postmaster dead but pid file exists log shows FATAL: lock file "/tmp/.s.PGSQL.5432.lock" already exists HINT: Is another postmaster (PID 4696) using socket file "/tmp/.s.PGSQL.5432"? LOG: could not bind IPv4 socket: Address already in use and the postgresql could not restarted. --- After deleting the /tmp/.s.PGSQL.5432 file and

Amazon AWS, cap deploy:check fails

早过忘川 提交于 2019-12-12 02:22:49
问题 I'm trying to setup deployment to an AWS EC2 instance, using capistrano. In order to test, I'm using cap testing deploy:check but Capistrano fails with: triggering load callbacks * 2013-03-12 15:41:27 executing `testing' triggering start callbacks for `deploy:check' * 2013-03-12 15:41:27 executing `multistage:ensure' * 2013-03-12 15:41:27 executing `deploy:check' * executing "test -d /......./releases" servers: ["ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com"] connection failed for: ec2-xxx-xxx