capistrano

Rails: Unable to access log file

£可爱£侵袭症+ 提交于 2020-01-19 07:29:18
问题 I get the following error when restarting my rails app. I've had this problem before, on another server with another app, but can't remember what the problem was, or how I solved it. Rails Error: Unable to access log file. Please ensure that /apps/staging/releases/20090310162127/log/staging.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. I'm deploying to a mongrel cluster with capistrano on Ubuntu. When I do ls

Rails: Unable to access log file

流过昼夜 提交于 2020-01-19 07:28:04
问题 I get the following error when restarting my rails app. I've had this problem before, on another server with another app, but can't remember what the problem was, or how I solved it. Rails Error: Unable to access log file. Please ensure that /apps/staging/releases/20090310162127/log/staging.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. I'm deploying to a mongrel cluster with capistrano on Ubuntu. When I do ls

How do I use transactions within custom capistrano tasks?

冷暖自知 提交于 2020-01-15 06:21:33
问题 I'm writing a custom capistrano task to minify my javascripts and want to handle the case where the minification fails by rolling back the deploy. I've been through the documentation and thought I'd figured out how to do it, but it's not working for me. Here's what I have: desc 'Minify all javascript files' task :bundle, :roles => :app, :except => { :no_release => true } do on_rollback do run "rm #{current_path}/public/javascripts/all.js" puts "ROLLBACK" end transaction do run "cd #{current

Capistrano 3 runs every command twice (new install) - Configuration issue

空扰寡人 提交于 2020-01-14 12:16:08
问题 I just completed my capistrano installation for the first time. Most of everything is left to default settings, I configured my server, its authentification, and the remote folder, as well as the access to my git repository. I use capistrano to deploy php code to my server. cap staging deploy and cap production deploy function, but they run every command twice . It sometimes causes problems when those tasks are executed too quickly on the server, returning error codes, which stops the

How can I get passenger-config restart-app to work?

删除回忆录丶 提交于 2020-01-13 09:24:08
问题 Rails 4.1 on Ubuntu 14.04 with rbenv and ruby 2.2.1. Using capistrano with the capistrano-passenger gem, but the restart at the end fails: INFO [8213c63a] Running /usr/bin/env passenger-config restart-app /home/deployer/my_app --ignore-app-not-running as deployer@mysite.com DEBUG [8213c63a] Command: passenger-config restart-app DEBUG [8213c63a] Please pass either an app path prefix or an app group name. See --help for more information. When I try to run this command at the command line via

Rails 4 API deployment example to Amazon EC2 using Capistrano 3, Nginx, Puma, GitHub, and RVM?

南笙酒味 提交于 2020-01-13 08:31:47
问题 I have a Rails 4 API project on GitHub, and I'm trying to deploy it from my MacBook Pro using Capistrano 3 to two Amazon AWS EC2 Ubuntu instances using SSH keys - one is the app/web server, and the other is the PostgreSQL database server. The app/web server has the latest Ruby 2 via RVM, and will serve the API with Nginx / Puma . Nginx will host multiple sites, one of which is this API. These are the relevant gems I'm using: gem 'capistrano', '~> 3.0.0' gem 'capistrano-rails' gem 'capistrano

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

家住魔仙堡 提交于 2020-01-13 08:15:40
问题 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, 'git@bitbucket.org:sergiotapia/testapp.git' set :user, "deploy" # The user on the VPS server. set :password, "hunter2$$" set :use_sudo, false set :deploy_to, "/home/deploy/www/testapp" set :deploy_via, :remote_cache set :pty, true set :format, :pretty set :keep_releases, 1 set :rails_env, "production" set :migrate_target,

Rails 5 console not working when deploying with Capistrano

删除回忆录丶 提交于 2020-01-11 03:18:28
问题 I amm using Rails 5, and I have half way deployed my app through Capistrano on server. due to specific need to loadschema, i ssh in and cd into the release/### directory and tried to run rails --version # came out 5.0.3beta bundle # works, everything installed rails c # but this fail running rails db:migrate also failed. it seems to return rails generic help as like my directory isn't a rails directory. i tried deleting bin folder, but still the same. anyone know what could be wrong? thank

Capistrano 3 change ssh_options inside task

戏子无情 提交于 2020-01-10 03:03:26
问题 I trying to run capistrano v.3 task in same stage with diferent ssh_options. my production.rb say: set :stage, :production set :user, 'deploy' set :ssh_options, { user: 'deploy' } With this configuration capistrano connect with user deploy which is correct for the rest of taks. But I need connect it for one specific task with an_other_user wich is well configured in server. Then my recipe say: ... tasks with original user ... task :my_task_with_an_other_user do set :user, 'an_other_user' set

Bundle install error when deploying via capistrano (& rvm)

北城以北 提交于 2020-01-07 04:32:10
问题 Now I must admit that I'm stumbling around in the dark a little bit as far as this deployment lark is concerned. I'll try and explain the situation best I can; I have set up a test deployment server and am trying to deploy my app to it with capistrano, however, I am encountering some difficulties surrounding my gems and their dependencies, as the error below shoes. [mike-test] executing command [mike-test] rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.3' -c 'cd /home/deploy/myapp