Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
160 votes
15 answers
68k views

What is your preferred php deployment strategy? [closed]

I'm beginning a new project in PHP and I'd love to get some feedback from other developers on their preferred strategy for PHP deployment. I'd love to automate things a bit so that once changes are ...
GloryFish's user avatar
  • 13.3k
76 votes
10 answers
18k views

Capistrano deploy fails after I changed the repository URL

I have a simple deployment via capistrano from a Git repository. At first I was deploying form GitHub, everything worked just fine. But then I moved my repository to BitBucket and now I'm getting ...
Jakub Arnold's user avatar
  • 86.7k
67 votes
12 answers
16k views

Deploying a Git subdirectory in Capistrano

My master branch layout is like this: / <-- top level /client <-- desktop client source files /server <-- Rails app What I'd like to do is only pull down the /server directory in my ...
Jarin Udom's user avatar
  • 1,849
61 votes
5 answers
34k views

How to deploy to a single specific server using Capistrano

I have a system in production that has several servers in several roles. I would like to test a new app server by deploying to that specific server, without having to redeploy to every server in ...
Pete Hodgson's user avatar
  • 15.8k
58 votes
13 answers
35k views

Deny access to .svn folders on Apache

We have a rails application in subversion that we deploy with Capistrano but have noticed that we can access the files in '/.svn', which presents a security concern. I wanted to know what the best ...
csexton's user avatar
  • 24.6k
58 votes
3 answers
23k views

Capistrano deployment problems

When I type cap production deploy I get Capfile locked at 3.1.0, but 3.2.0 is loaded When I uninstall capistrano 3.2.0 I get Could not find capistrano-3.2.0 in any of the sources Run `bundle ...
Kamil Lelonek's user avatar
54 votes
9 answers
37k views

Capistrano SSH::AuthenticationFailed, not prompting for password

I've been using capistrano successfully for a while now and all of a sudden in every project I've lost the ability to deploy. Environment: os X (Mavericks) ruby 1.9.3p194 rvm (locally, not on server)...
Sparkmasterflex's user avatar
52 votes
6 answers
51k views

Capistrano - How to put files in the shared folder?

I am new to Capistranoand I saw there is shared folder and also option :linked_files. I think shared folder is used to keep files between releases. But my question is, how do files end up being in the ...
Fajarmf's user avatar
  • 2,253
39 votes
4 answers
18k views

How do I target a specific commit SHA with capistrano deploy

I am wondering how I can target a specific commit SHA in Git for deployment, using Capistrano? It should be something like cap deploy --version=<sha targeted> Can't seem to find the answer to ...
Scott Miller's user avatar
  • 2,298
36 votes
7 answers
12k views

Hot deploy on Heroku with no downtime

A bad side of pushing to Heroku is that I must push the code (and the server restarts automatically) before running my db migrations. This can obviously cause some 500 errors on users navigating the ...
zetarun's user avatar
  • 787
34 votes
5 answers
33k views

Passing parameters to Capistrano

I'm looking into the possibility of using Capistrano as a generic deploy solution. By "generic", I mean not-rails. I'm not happy with the quality of the documentation I'm finding, though, granted, I'm ...
Daniel C. Sobral's user avatar
32 votes
10 answers
29k views

bundle install doesn't work from capistrano

I want to deploy my simple rails 4.0 application via capistrano 3.0. I use bundler 1.3.5 so I add capistrano-bundler gem to integrate bundler with capistrano. I have pretty simple configuration (...
freemanoid's user avatar
  • 14.7k
29 votes
4 answers
30k views

Restart nginx without sudo?

So I want to be able to cap:deploy without having to type any passwords. I have setup all private keys so I can get to the remote servers fine, and am now using svn over ssh, so no passwords there. ...
tesserakt's user avatar
  • 3,301
23 votes
2 answers
8k views

How to modify capistrano deploy to automatically run migrations in Rails 3.0

Right now, I have to run cap deploy and cap deploy:migrations if there are migrations to be run. how I modify the cap deploy task to run migrations.
Amal Kumar S's user avatar
  • 15.8k
21 votes
3 answers
15k views

Capistrano mkdir permission denied

When I run cap production deploy I get cannot create directory ‘/var/www/application/repo’: Permission denied. So far I've created deploy user like: adduser deploy adduser deploy sudo and I use ...
Kamil Lelonek's user avatar
21 votes
3 answers
7k views

Is there a way to deploy into a vagrant VM using Capistrano?

I'd like to setup a vagrant instance outside of my project directory. Is there a way to deploy rails into the vagrant VM with capistrano as I would to my real production host? I'm trying to use ...
Nathan's user avatar
  • 7,807
21 votes
3 answers
5k views

database.yml deployment best practice

I don't check my database.yml file into source control and I was wondering what others do/best practice for copying this file over to the server when deploying. I use Capistrano for deployment.
robzolkos's user avatar
  • 2,246
19 votes
3 answers
19k views

Using Capistrano to deploy a Rails application to multiple web servers

I'm currently setting up a new production environment for a Rails application which includes multiple, load-balanced application servers (currently only two, but this will increase over time). I'd ...
Olly's user avatar
  • 7,748
19 votes
4 answers
6k views

"Warm Up Cache" on deployment

I am wondering if anyone has any plugins or capistrano recipes that will "pre-heat" the page cache for a rails app by building all of the page cached html at the time the deployment is made, or ...
Scott Miller's user avatar
  • 2,298
19 votes
4 answers
22k views

Setting the Ruby on Rails application environment using Capistrano on Phusion Passenger

I have 2 environments, production and staging, and I am using Capistrano with capistrano-ext gem. When I deploy to staging using Capistrano and restart passenger, I would like the deployed ...
dangerousdave's user avatar
19 votes
2 answers
8k views

Using Capistrano to deploy (a non-Rails site) via FTP?

How would I go about this? I have a mostly static site, which is being hosted on a cheap web-host, which only allows FTP access to the hosting. The site is tracked in git. I am using OS X. I would ...
dbr's user avatar
  • 168k
18 votes
2 answers
17k views

Capistrano - "cannot load such file --deploy"

Working on an existing rails project that is set up to deploy with Capistrano. Trying to determine my first step in figuring out this error. Can anyone point me in the right direction of what I need ...
Lucas Holmgren's user avatar
18 votes
3 answers
27k views

Unicorn unable to write pid file

I am using deploying a Ruby on Rails app to a Linode VPS using Capistrano. I am using Unicorn as the application server and Nginx as the proxy. My problem is that I am not able to start Unicorn ...
Mike Filbin's user avatar
18 votes
5 answers
20k views

Capistrano + Git : repository local to production server

I am trying to do 'deploy:cold' for my app. The git repo is local to my deployment server (i.e. I only have one server for everything and I don't host my code on github). Here is the transcript (...
Mark Richman's user avatar
  • 29.5k
17 votes
1 answer
10k views

undefined method `run' for main:Object

i'm getting the following output when deploying: cap aborted! NoMethodError: undefined method `run' for main:Object config/deploy.rb:37:in `block (2 levels) in <top (required)>' /var/lib/gems/1....
agro's user avatar
  • 206
17 votes
2 answers
10k views

Rails: Why is bundle install frozen up by sassc 2.4.0

I'm trying to deploy my rails app with Capistrano, however, the deploy process (cap production deploy) is constantly held up at the line: $HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/...
jacob_g's user avatar
  • 739
16 votes
3 answers
13k views

Capistrano: linked file database.yml does not exist on my.server.ipadress

after i try to deploy my app via capistrano to my server i get this error message: DEBUG [605f198a] Finished in 0.084 seconds with exit status 1 (failed). ERROR linked file /home/deploy/myrailsapp/...
juicy's user avatar
  • 865
15 votes
6 answers
15k views

Capistrano for Java?

I'm a big fan of Capistrano but I need to develop an automated deployment script for a Java-only shop. I've looked at Ant and Maven and they don't seem to be well geared towards remote administration ...
Teflon Ted's user avatar
  • 8,806
15 votes
2 answers
16k views

LoadError: cannot load such file -- capistrano/rbenv

I'm following this guide to deploy my Rails app on DigitalOcean using Capistrano. At the end of stop 5 I check the server availability through the following command: cap production deploy:check ...
Peter Boomsma's user avatar
14 votes
8 answers
35k views

Assets won't precompile when deploying with capistrano to production on amazon EC2

I worked on being able to deploy to production using capistrano. I face several issues and while fixing most of them we still have a last one. Our precompile assets options are not properly ...
TKVR's user avatar
  • 211
14 votes
1 answer
12k views

rails capistrano deployment error

I have installed capistrano with gem capistrano And in my application directory i installed cap install This command includes deploy/production.rb and deploy/staging.rb and in config/deploy.rb my ...
Prabhakaran's user avatar
  • 3,970
13 votes
3 answers
3k views

How do you handle deploying rails applications with submodules?

I recently turned a couple of my plugins into submodules and realized that when you "git clone" a repository, the submodule directory will be empty. This makes sense for co-developers to initialize ...
Tony's user avatar
  • 19k
12 votes
1 answer
4k views

Missing folder errors during capistrano deploy

I'm not sure I understand the error messages I'm getting while attempting to deploy my rails app with capistrano. The deploy is failing because of some missing directory (more specifically: images, ...
J K's user avatar
  • 495
12 votes
1 answer
3k views

Capistrano Deploy Wipes Database?

I've managed to deploy my app to production using Capistrano, but I don't understand how to deal with my database. I'm using subversion and passenger. When I run cap deploy, the new deployment ...
MikeH's user avatar
  • 866
12 votes
2 answers
3k views

Is there a Perl or Lua alternative to Capistrano?

For a number of web-applications I need something like Capistrano to automate deployment. I know Capistrano can be used to deploy non-ruby applications but I'm not familiar with Ruby, so I expect ...
Htbaa's user avatar
  • 2,309
12 votes
2 answers
2k views

How is Capistrano related to Rake?

I'm starting to read up on Capistrano after using Rake tasks to deploy apps for a long time. It's really striking how similar it is to Rake. A lot of parallel commands (like cap -T) and a lot of ...
Ethan's user avatar
  • 59.3k
11 votes
1 answer
5k views

Capistrano and deployment of a website from Github

So, I had what I thought was a fairly simple Capistrano use case: I want to deploy a PHP site from Github. But I'm running into a lot of problems. When I run cap deploy, Capistrano is able to clone ...
Trevor Burnham's user avatar
11 votes
3 answers
11k views

Capistrano - can't deploy my database.yml

When I try to deploy my app with capistrano, I'll get this error: failed: "sh -c 'cp /var/www/my_app/releases/20120313115055/config/database.staging.yml /var/www/my_app/releases/...
user984621's user avatar
  • 47.7k
11 votes
3 answers
12k views

Sidekiq deploy to multiple environments

(See below for my detailed config, which is the result of Henley Chiu's answer). I've been trying to wrap my brain around Sidekiq deploys, and I am not really getting it. I have an app with a staging ...
d3vkit's user avatar
  • 1,972
11 votes
1 answer
5k views

How can I trigger a Capistrano task from a different namespace than :deploy?

In my capistrano recipe, I have a namespace with different tasks: namespace :mystuff do task :mysetup do; ... end; task :mytask1 do; ... end; task :mytask2 do; ... end; task :mycleanup do; ......
Tom's user avatar
  • 14.2k
10 votes
3 answers
21k views

Fatal: could not read Username for 'https://github.com': No such device or address

I have been deploying my Rails 4 application to Rackspace using github and capistrano for a few weeks now. Everything worked fine until I finally made my repository private. Now, I am receiving the ...
user2147143's user avatar
10 votes
3 answers
10k views

Deploy Rails Application on EC2

For the past week, I've been playing with the Rubber gem and can't seem to get it to work. I've decided it would be easier just to manually set up my EC2 instance. The problem is that I don't know how....
Astephen2's user avatar
  • 841
10 votes
3 answers
6k views

Capistrano for Django

Does anyone know of a good Django equivalent of Capistrano/Webistrano?
Jake's user avatar
  • 12.9k
10 votes
2 answers
4k views

Capistrano bitbucket - Permission denied (publickey)

I'm trying to deploy my application using Capistrano towards my DigitalOcean server. This isn't the first time I've configured a RoR server on DigitalOcean with Capistrano deploys that's why I'm ...
sergserg's user avatar
  • 22k
10 votes
3 answers
4k views

Excluding files from being deployed with Capistrano while still under version control with Git

I want to start testing the JavaScript in my Rails apps with qUnit and I'm wondering how to keep the test JavaScript and test runner HTML page under version control (I'm using Git, of course) but keep ...
Jimmy's user avatar
  • 36.6k
10 votes
2 answers
3k views

Some Capistrano deployment hooks not working

I am using Capistrano v2.14.2 and trying to use the before and after hooks for deploy:create_symlink, but none of them seem to firing... I was getting this Warning: [Deprecation Warning] This API ...
Michael's user avatar
  • 3,608
10 votes
2 answers
2k views

Is it possible to do have Capistrano do a checkout over a reverse SSH tunnel?

I am developing an application that resides on a public host but whose source I must keep in a Git repository behind a corporate firewall. I'm getting very tired of the slowness of deploying via scp (...
James A. Rosen's user avatar
10 votes
2 answers
4k views

Capistrano 3 deploy asking for SSH passphrase but cannot type it in

I'm trying to use Capistrano 3 to deploy a Rails 4 application. #config valid only for Capistrano 3.1 lock '3.1.0' set :application, 'testapp' set :scm, :git set :repo_url, '[email protected]:...
sergserg's user avatar
  • 22k
9 votes
1 answer
4k views

How do I configure remote refs for git + capistrano 3 in ROR deployment?

I am trying to use capistrano (for the first time) to deploy my rails app. First the essentials, I am using: ruby 1.9.3p362 Rails 3.2.13 rvm 1.24.7 Capistrano 3.0.1 Phusion Passenger 4.0.26 Ubuntu 12....
Thomas's user avatar
  • 2,446
9 votes
3 answers
5k views

tags vs branches in git [closed]

We have a large rails project that runs on a production and staging server. Is it a good idea to create tags everytime we deploy to staging or production (this would happen automatically with ...
antpaw's user avatar
  • 15.8k

1
2 3 4 5
17