capistrano

How to solve the “You need to add gem 'daemons' to your Gemfile if you wish to use it” error in production mode?

我怕爱的太早我们不能终老 提交于 2019-12-21 17:36:20
问题 I am trying to properly use Capistrano and RVM in order to deploy my Ruby on Rails 3.2.2 application to the remote machine that is running Ubuntu 10.04 LTS. It seams that I solved my previous problem related to the "Rvm - Capistrano integration on Linux Ubuntu". However, on deploying I get the following error related to the DelayedJob gem: ... * executing "cd /srv/www/<APP_NAME>/releases/20120314135318 && bundle install" servers: ["<DOMAIN>"] [<DOMAIN>] executing command [<DOMAIN>] rvm_path=

Rails assets missing after Capistrano deploy

杀马特。学长 韩版系。学妹 提交于 2019-12-21 14:33:30
问题 I'm building a VPS, and it's deployed via Capistrano, database connected etc, but there are no assets available to the page - it is basic html only. The assets appear to be compiled, and exist in the shared directory. From the page html: <link href="/assets/application-a1b5d69aeaff709fd3dce163c559b38b.css" media="all" rel="stylesheet" type="text/css" /> <script src="/assets/application-0ebd07089629f8c6880dddfb688d525d.js" type="text/javascript"></script> The asset files appear to exist in the

Rails assets missing after Capistrano deploy

徘徊边缘 提交于 2019-12-21 14:32:53
问题 I'm building a VPS, and it's deployed via Capistrano, database connected etc, but there are no assets available to the page - it is basic html only. The assets appear to be compiled, and exist in the shared directory. From the page html: <link href="/assets/application-a1b5d69aeaff709fd3dce163c559b38b.css" media="all" rel="stylesheet" type="text/css" /> <script src="/assets/application-0ebd07089629f8c6880dddfb688d525d.js" type="text/javascript"></script> The asset files appear to exist in the

Capistrano 3 copy strategy equivalent

放肆的年华 提交于 2019-12-21 09:19:55
问题 I updated to Cap 3 and it appears that set :deploy_via, :copy is no longer supported. In the release annoucement there is a link to a video for replicating the copy strategy which currently returns a 404. I used the :copy strategy because the server did not have access to git or access to the repository because it was behind a firewall. What is the best way to replicate this functionality with v3? 回答1: I ran into the same issue and posted a similar question on the capistrano google group. See

Define Bundle Path With Capistrano

浪尽此生 提交于 2019-12-21 05:35:17
问题 I am using the following configurations in my deploy.rb file for capistrano: require 'bundler/capistrano' require 'rvm/capistrano' set :bundle_cmd, "/home/deployment/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle" set :default_environment, { 'PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194/bin:/home/deployment/.rvm/bin:$PATH", 'RUBY_VERSION' => 'ruby 1.9.3', 'GEM_HOME' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194", 'GEM_PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194", 'BUNDLE_PATH'

Capistrano deployment from Windows using forward_agent option: “Error reading response length from authentication socket.”

你离开我真会死。 提交于 2019-12-21 03:42:31
问题 I'm trying to deploy a project using Capistrano. My development machine is running Windows 7; the server I'm deploying onto is Linux. In the deploy.rb script, the following is set: ssh_options[:forward_agent] = true The Capistrano script starts off by running a git command locally, at which point I'm prompted for the passphrase for my SSH key: * executing `deploy:update_code' executing locally: "git ls-remote git@github.com:pathto/gitproject.git develop" Enter passphrase for key '/c/Users/Sam

How do I change the temporary directory that Capistrano uses?

不想你离开。 提交于 2019-12-21 03:36:21
问题 How would I change the temporary dir that Capistrano uses? Example: Instead of /tmp , I want to use /home/user/tmp My current VPS has /tmp mounted as noexec , which gives me permission denied errors while trying to run cap production deploy . 回答1: In Capistrano 3, set :tmp_dir, '/home/user/tmp' 回答2: Are you talking about the remote tmp directory? If yes, here an example:: set :copy_remote_dir, deploy_to This will change the default tmp directory where the archive was copied on the remote

How can I combine these git commands?

时光毁灭记忆、已成空白 提交于 2019-12-21 02:51:51
问题 I do the following string of commands for git and my fingers are getting tired of typing them. :) git add . git commit -m 'Some message' git push cap deploy How can I combine those (including adding a message) into a single command, like "git booyah" or something? 回答1: This is not an answer to your question (my answer would be: make a bash/batch script). I say this: Don't do git add . This will add every change and all untracked files in the current directory and it's descendants. You might

Capistrano - How to deploy to multiple cloud servers

淺唱寂寞╮ 提交于 2019-12-20 16:49:14
问题 I've heard that Capistrano supports deployment to multiple servers, but I haven't found a practical way to set it up. When I say multiple servers I mean servers running the same application in a production environment. At any time I would like to deploy to 5 or 10 servers if that is what I'm currently using. Thank you. 回答1: Using multiple servers is one of the main reasons to use capistrano versus just doing things by hand. Your deploy.rb just needs to define what actions should be performed

Git Workflow With Capistrano

自古美人都是妖i 提交于 2019-12-20 14:42:10
问题 I'm trying to get my head around a good git workflow using capistrano. I've found a few good articles, but I'm either not grasping completely what they're suggesting (likely) or they're somewhat lacking. Here's kind of what I had in mind so far, but I get caught up when to merge back into the master branch (i.e. before moving to stage? after?) and trying to hook it into capistrano for deployments: Make sure you’re up to date with all the changes made on the remote master branch by other