capistrano3

Capistrano 3 SSHKit::Runner::ExecuteError: Exception while executing on host [hostname ]agent could not sign data with requested identity

你说的曾经没有我的故事 提交于 2019-12-06 17:02:37
问题 I'm getting the following error while deploying my rails app to an ubuntu server, I have correctly setup ssh keys and I can ssh to the server but I'm getting the following when I try to do cap production deploy This is the error message cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host xxxxxx.xxxxxxx.xxx: agent could not sign data with requested identity I can't figure out what I am doing wrong since I had previously deployed and I just need to update my app to

To use bash --login by default with capistrano 3 + sshkit + rvm

☆樱花仙子☆ 提交于 2019-12-06 13:37:15
I have following cap3 task task :gemset do on roles(:all) do if remote_dir_exists?(".rvm") execute :rvm, :gemset, :use, "#{ Configs.rvm.ruby }@#{ Configs.rvm.gemset } --create" else info "RVM not installed" end end end for settings rvm: ruby: ruby-2.0.0-p247 gemset: cap3 it should execute on my server following command rvm gemset use ruby-2.0.0-p247@cap3 --create but it gives to me DEBUG [9bd5fc11] RVM is not a function, selecting rubies with 'rvm use ...' will not work. DEBUG [9bd5fc11] DEBUG [9bd5fc11] You need to change your terminal emulator preferences to allow login shell. DEBUG

CSS doesn't load in production - everything fine in dev (Rails 4.1, Capistrano 3; bootstrap), update: nginx config issue

风流意气都作罢 提交于 2019-12-06 05:31:28
Problem is as follows: Everything works fine in development, but when I deploy my rails app to production, the site works in plain html, but CSS (bootstrap) doesn't get loaded (JS probably also not). Sorry, I looked for 2 days at ~15 possible solutions and could not make it work... Update: After following @rich-peck's advice, it looks like it's a server issue. Updated with nginx config My setup: Ruby 2.1.2, Rails 4.1 Rbenv mysql2 as db Bootstrap 3 Ubuntu 14.04 on Server with nginx and passenger Capistrano 3 for deployment Config as follows - production.rb: config.cache_classes = true config

How to get Capistrano 3 to use RVM ruby?

与世无争的帅哥 提交于 2019-12-05 15:59:43
Gemfile: gem 'capistrano', '~> 3.0.0' gem 'capistrano-rails' gem 'capistrano-bundler' gem 'capistrano-rvm' gem 'capistrano3-puma' Deploy.rb: set :rvm_type, :user set :rvm_ruby_version, '2.1.1' set :default_env, { rvm_bin_path: '~/.rvm/bin' } Production.rb namespace :rails do desc "Open the rails console on primary app server" task :console do on roles(:app), primary: true do execute_interactively "#{current_path}/script/rails console RAILS_ENV=production" end end def execute_interactively(command) cmd = "ssh -l deploy 255.255.255.255 -p 21 -t 'cd #{deploy_to}/current && #{command}'" info

How to run custom rake task via capistrano 3?

有些话、适合烂在心里 提交于 2019-12-05 14:50:50
问题 which way, i can run rake commands via capistrano on remote server. for example i have a lib/task/reparse.rake with some methods desc "it's take csv file, makes some changes and fill db with this info" task :example1 => :environment do require 'csv' rows_to_insert = [] # some actions # ... end on local server all is fine - i just run rake reparse:example1 and it's work(fill db correctly). so question is - how can i run this command on real hosting, after deploy? i'am using rails 4.1 +

How can I use Rails 5.2 credentials in capistrano's deploy.rb file?

血红的双手。 提交于 2019-12-05 08:10:22
I've just updated my Rails app to 5.2, and configured it to use the new config/credentials.yml.enc file. When I try to deploy, I get this error: NameError: uninitialized constant Rails /Users/me/Documents/project/config/deploy.rb:27:in `<top (required)>' That's pointing to this line in my config/deploy.rb file: set :rollbar_token, Rails.application.credentials[:rollbar_token] So it appears that while capistrano is running, it doesn't have access to Rails.application.credentials . How are you all handling this? I've got some ideas... Set this one variable as an ENV variable I don't love how

Capistrano 3 SSHKit::Runner::ExecuteError: Exception while executing on host [hostname ]agent could not sign data with requested identity

家住魔仙堡 提交于 2019-12-04 22:37:29
I'm getting the following error while deploying my rails app to an ubuntu server, I have correctly setup ssh keys and I can ssh to the server but I'm getting the following when I try to do cap production deploy This is the error message cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host xxxxxx.xxxxxxx.xxx: agent could not sign data with requested identity I can't figure out what I am doing wrong since I had previously deployed and I just need to update my app to changes I have made. I have not changed my deploy.rb, Capfile or deploy/production.rb files since I last

Rails Capistrano 3 - how to share production.log file into the shared folder of Capistrano?

岁酱吖の 提交于 2019-12-04 19:36:29
I'm using Capistrano 3 for deployment with my Rails app. The problem is that every time I deploy my app to the server the ./log/production.log file is reset. I've heard it's possible to have the production.log file into the shared folder and being appended at each deployment. I thought this was made by default by Capistrano but apparently not for me :( Any thoughts? Thanks! In your config/deploy.rb you need a line similar to this: set :linked_dirs, %w{log public/system} This will tell capistrano to symlink log and public/system into the shared directory on deployment. 来源: https://stackoverflow

Bundler with Capistrano doesn't generate a binary for DelayedJob

我与影子孤独终老i 提交于 2019-12-04 05:01:41
I'm using Bundler for a Rails app deployed by Capistrano. I'm trying to add the DelayedJob gem, but the bin/delayed_job file is missing from the remote server after I do a deploy. It exists on my local machine. I tried manually creating it with bundle binstubs delayed_job but it fails with: There are no executables for the gem delayed_job. What am I missing here? The gems in question are: Bundler 1.3.5, Capistrano 3.1.0, DelayedJob 4.0.0, Rails 4.0.2 EDIT: Here is my full Gemfile: http://pastebin.com/WuE3eJrj I think you need to include the gem "daemons" , according to the documentation: To do

How to run custom rake task via capistrano 3?

こ雲淡風輕ζ 提交于 2019-12-04 02:26:20
which way, i can run rake commands via capistrano on remote server. for example i have a lib/task/reparse.rake with some methods desc "it's take csv file, makes some changes and fill db with this info" task :example1 => :environment do require 'csv' rows_to_insert = [] # some actions # ... end on local server all is fine - i just run rake reparse:example1 and it's work(fill db correctly). so question is - how can i run this command on real hosting, after deploy? i'am using rails 4.1 + capistrano 3. P.S. examples from site not work for me How do I run a rake task from Capistrano? if i try cap