capistrano

How do I manage bundled gems in a capistrano deployment?

…衆ロ難τιáo~ 提交于 2020-02-01 04:55:06
问题 Currently, I'm just running the following: after 'deploy:update_code', 'deploy:bundle' namespace :deploy do task :bundle do run "cd #{release_path} && bundle install --deployment --without development test staging" end end Now this works fine, but the bundler ends up installing all the gems to vendor/gems every time. While I understand the merit in isolating the gems to each release (as opposed to using the shared folder, which (?) might result in errors on rollback and such), surely there is

How do I configure capistrano to use my rvm version of Ruby

橙三吉。 提交于 2020-01-27 04:50:46
问题 Does anybody know how I can tell capistrano to use my default rvm version of ruby for on the server I am pushing to. It insists on using the system version. Is it even possible? 回答1: The rvm-capistrano gem is the best way to go. Link to the official detailed usage of that gem. From that I am guessing this will get the local version of Ruby: set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system 回答2: You have two options: Enable .ssh environment variables using the

Proc_open and Capifony issue

拟墨画扇 提交于 2020-01-25 23:45:57
问题 I'm trying to use Capifony with my web app in Symfony2.1 to accelerate the deployment process. Here is my deploy.rb file : default_run_options[:pty] = true set :application, "mywebsite" set :domain, "mywebsite.com" set :deploy_to, "~/git/mywebsite.git" set :app_path, "app" set :repository, "git@github.com:myname/mywebsite.git" set :scm, :git # Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none` set :user, "myserveruser" # The server's user for deploys set

Proc_open and Capifony issue

╄→尐↘猪︶ㄣ 提交于 2020-01-25 23:40:33
问题 I'm trying to use Capifony with my web app in Symfony2.1 to accelerate the deployment process. Here is my deploy.rb file : default_run_options[:pty] = true set :application, "mywebsite" set :domain, "mywebsite.com" set :deploy_to, "~/git/mywebsite.git" set :app_path, "app" set :repository, "git@github.com:myname/mywebsite.git" set :scm, :git # Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none` set :user, "myserveruser" # The server's user for deploys set

Proc_open and Capifony issue

那年仲夏 提交于 2020-01-25 23:40:07
问题 I'm trying to use Capifony with my web app in Symfony2.1 to accelerate the deployment process. Here is my deploy.rb file : default_run_options[:pty] = true set :application, "mywebsite" set :domain, "mywebsite.com" set :deploy_to, "~/git/mywebsite.git" set :app_path, "app" set :repository, "git@github.com:myname/mywebsite.git" set :scm, :git # Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none` set :user, "myserveruser" # The server's user for deploys set

Capistrano Staging Deploy Requires Whole New Database Migration

自古美人都是妖i 提交于 2020-01-25 20:02:05
问题 I have Capistrano set up such that it allows me to deploy the staging version of my Ruby on Rails website to an amazon server from a git repository successfully. However, after deploying, I must run a migration on the database on the server. If I do not, any page with login forms or database-based content cannot load. When I run the migration on the server, I see every singly migration on the site being migrated, not just the most recent ones. I know that Capistrano can maintain the previous

Capistrano + RVM + Rake task

南楼画角 提交于 2020-01-25 08:29:11
问题 I have a project which uses rvm ruby 1.9.2 (set in .rvmrc in project dir). deploying with capistrano. has a rake task I want to run remotely from my local machine by capistrano. I've created a .sh file to run my task: cd /var/www/pluslook/current /home/kirill/.rvm/scripts/rvm use 1.9.2@pluslook /home/kirill/.rvm/gems/ruby-1.9.2-p180@pluslook/bin/rake parse:feed RAILS_ENV="production" --trace But when I'm trying to run this task i have an error: Using /home/kirill/.rvm/gems/ruby-1.9.2-p180

Nokogiri gem install failing in Capistrano deploy

此生再无相见时 提交于 2020-01-25 01:40:25
问题 When attempting to install Nokogiri via bundler/capistrano I am receiving the error: An error occurred while installing nokogiri (1.6.5), and Bundler cannot continue Digging deeper I can see >> libxml2 version 2.6.21 or later is required! The error message also says Make sure that gem install nokogiri -v '1.6.5' succeeds before bundling. Well, as you can see this is not a problem: vagrant@vagrant:~$ gem install nokogiri -v '1.6.5' Building native extensions. This could take a while...

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 '

Why am I getting Permission denied error in deployment on files generated by capistrano?

陌路散爱 提交于 2020-01-24 01:05:20
问题 I was having a failed: "sh -c 'cd /var/www error. Then fixed it by adding the following in deploy.rb... set :default_environment, { 'PATH' => "/var/lib/gems/1.9.1/bin:$PATH" } Now I'm getting this new error. ** [out :: ip.address] Rails Error: Unable to access log file. Please ensure that /var/www/releases/20111208152807/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed. ** [out :: ip.address] mkdir