capistrano

Bundler::GemfileError on Rails app on Passenger after switching to Capistrano

梦想与她 提交于 2019-12-14 02:22:19
问题 I have a rails app that runs on Phusion Passenger with Apache in production. Everything worked when I used to manually deploy (by SSH-ing in to the server and fetching the latest updates, etc.), but I recently switched to Capistrano to make life easier on my team members. Now, when I try to access the site, Passenger throws the following error: Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (There was an error in your Gemfile, and Bundler cannot

The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying

喜夏-厌秋 提交于 2019-12-13 21:21:43
问题 I get this error when i deploy with Capistrano on a server, I have tried to solve it for about 3 hours now unsuccessfully this errors happens when cap runs bundle install executing "cd $HOME/releases/20130629113827 && bundle install --gemfile $HOME/releases/20130629113827/Gemfile --path $HOME/shared/bundle --deployment --quiet --without development test" executing command The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control

capistrano password prompt

淺唱寂寞╮ 提交于 2019-12-13 16:47:20
问题 Capistrano keeps asking me for password for every deplyoyment. How do I not let it happen? ruby version 1.8.7 REE capistrano version 2.5.19 Here is my capfile and directory permissions. http://pastie.org/1189919 Everything up-to-date ** transaction: start * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote g...@github.com:username/ app_name.git master" * executing "if [ -d /var/www/app_name/shared/cached-copy ]; then cd /var/www/app

Rubber and Amazon EC2 hosting issue (Net::SSH::AuthenticationFailed: root)

无人久伴 提交于 2019-12-13 14:32:10
问题 I want to host my ruby on rails application on Amazon EC2 server. I am following Rubber and Amazon EC2 railcast on Ubuntu. When I execute cap rubber:create_staging command, its showing error something like this -- * 2013-06-19 17:00:53 executing `rubber:setup_remote_aliases' servers: ["production.ginfy.com", "www.ginfy.com", "foo.ginfy.com", "ginfy.ginfy.com", "temple.ginfy.com", "ibetter.ginfy.com"] connection failed for: www.ginfy.com (Timeout::Error: execution expired), ibetter.ginfy.com

How to detect orphaned sidekiq process after capistrano deploy?

折月煮酒 提交于 2019-12-13 04:44:49
问题 We have a Rails 4.2 application that runs alongisde a sidekiq process for long tasks. Somehow, in a deploy a few weeks ago something went south (the capistrano deploy process didn't effectively stopped it, wasn't able to figure out why) and there was left an orphaned sidekiq process running that was competing with the current one for jobs on the redis queue. Because this process source became outdated it started giving random results on our application (depending on which process captured the

How to add an if staging check to Capistrano task?

巧了我就是萌 提交于 2019-12-13 04:09:08
问题 Right now in Capistrano I have it doing execute "echo #{fetch(:stage)}" Which echoes out "staging" On the very next line I have if fetch(:stage) == "staging" Which never equals true. I tried changing it to if "staging == "staging" and it enters the body of it. Uh, what gives and how do I do a check to only run one line of code for staging. 回答1: fetch(:stage) is likely a symbol (it's been a while since I used capistrano). To verify this, use a more precise string representation: execute "echo

Capistrano cleanup task hangs some times

本小妞迷上赌 提交于 2019-12-13 02:38:23
问题 Why does the capistrano cleanup task hang sometimes and how can I fix it? It get's to this point and just sits there: * 2014-01-06 20:52:21 executing `deploy:cleanup' * executing "sudo -p 'sudo password: ' ls -1dt /var/www/jobfly/releases/* | tail -n +6 | sudo -p 'sudo password: ' xargs rm -rf" The weirdest thing is that this only happens sometimes. Other times it executes just fine. I have this as the last line in my deploy.rb: after "deploy:restart", "deploy:cleanup" # leave the last 5

Capistrano throws /usr/bin/env: ruby: No such file or directory when performing a deploy:migration

倾然丶 夕夏残阳落幕 提交于 2019-12-13 02:37:33
问题 I set up Capistrano to make the deploy of my app. I made it in steps, so first I set up the code deployment, so I commented all the roles but :app . I'm using rvm and I had some problems with it. The biggest problem was an error that said /usr/bin/env: ruby: No such file or directory . I solved them using the gem capistrano/rvm and requiring it in the Capfile and adding the following line to the deploy.rb file: set :default_env, { path: "/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin:$PATH" }

How do I use frozen Capistrano?

戏子无情 提交于 2019-12-13 00:25:34
问题 Backstory I'm on Rails 2.1 and need to freeze the Capistrano gem to my vendor folder (as my host has broken their cap gem dependencies and I want to make myself as independent as possible). On my local windows machine I've put the following my environment.rb config.gem "capistrano", :version => "2.5.2" config.gem "net-ssh", :lib => "net/ssh", :version => "2.0.4" config.gem "net-scp", :lib => "net/scp", :version => "1.0.1" config.gem "net-sftp", :lib => "net/sftp", :version => "2.0.1" config

run rails applicaton after capistrano deployment

北城以北 提交于 2019-12-12 23:44:16
问题 Deploying rails app throw Capistrano first time : I deployed my rails app on another machine (server) File structure for rails app ## this is my server akshay@akshay:/var/www/model_demo$ ls current releases repo revisions.log shared cap -T ## showing a lots of rake task like cap deploy:migrate # Runs rake db:migrate if migrations are set If I run this task it is not working saying Stage not set, please call something such as `cap production deploy`, where production is a stage you have