Comments (5)
Why did I include it? Lack of knowledge.
I just wanted to make sure there wasn't another problem you discovered that you had solved by requiring SSHKit. Apologies if that came off as passive-aggressive. π
from bundler.
I'd suggest customizing the bundle
command via the SSHKit command-map, like this:
# put this in deploy.rb
SSHKit.config.command_map[:bundle] = "/usr/local/bin/ruby233 /usr/local/bin/bundle233"
Does that work?
from bundler.
Seems like it is interfering with the deploy:check:directories
step for some reason.
Pre-SSHKit
Capfile
:
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Git
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# Phusion Passenger tasks
# https://github.com/capistrano/passenger
# require "capistrano/passenger"
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
$ bundle exec cap staging deploy
:
[user]@pippin:~/Projects/sinatra/foo$ bundle exec cap staging deploy
00:00 git:wrapper
01 mkdir -p /home/[user]/tmp
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.817s
Uploading /home/[user]/tmp/git-ssh-foo-staging-[user].sh 100.0%
02 chmod 700 /home/[user]/tmp/git-ssh-foo-staging-[user].sh
02 stdin: is not a tty
β 02 [user]@supersonic.webhostserver.biz 0.229s
00:01 git:check
01 git ls-remote git@bitbucket.org:[user]/foo.git HEAD
01 stdin: is not a tty
01 f8c6a45edc27c11667c706d31dbf5a4d34001f00 HEAD
β 01 [user]@supersonic.webhostserver.biz 1.643s
00:03 deploy:check:directories
01 mkdir -p /home/[user]/apps/foo/shared /home/[user]/apps/foo/releases
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.229s
00:03 deploy:check:make_linked_dirs
01 mkdir -p /home/[user]/apps/foo/shared/config
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.237s
00:04 git:clone
The repository mirror is at /home/[user]/apps/foo/repo
00:04 git:update
01 git remote set-url origin git@bitbucket.org:[user]/foo.git
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.240s
02 git remote update --prune
02 stdin: is not a tty
02 Fetching origin
β 02 [user]@supersonic.webhostserver.biz 1.662s
00:06 git:create_release
01 mkdir -p /home/[user]/apps/foo/releases/20181003173654
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.229s
02 git archive master | /usr/bin/env tar -x -f - -C /home/[user]/apps/foo/releases/20181003173654
02 stdin: is not a tty
β 02 [user]@supersonic.webhostserver.biz 0.231s
00:08 deploy:set_current_revision
01 echo "f8c6a45edc27c11667c706d31dbf5a4d34001f00" > REVISION
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.229s
00:08 deploy:symlink:linked_files
01 mkdir -p /home/[user]/apps/foo/releases/20181003173654/config
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.227s
02 ln -s /home/[user]/apps/foo/shared/config/database.yml /home/[user]/apps/foo/releases/20181003173654/config/database.yml
02 stdin: is not a tty
β 02 [user]@supersonic.webhostserver.biz 0.226s
00:09 deploy:symlink:release
01 ln -s /home/[user]/apps/foo/releases/20181003173654 /home/[user]/apps/foo/releases/current
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.227s
02 mv /home/[user]/apps/foo/releases/current /home/[user]/apps/foo
02 stdin: is not a tty
β 02 [user]@supersonic.webhostserver.biz 0.229s
00:09 deploy:cleanup
Keeping 3 of 4 deployed releases on supersonic.webhostserver.biz
01 rm -rf /home/[user]/apps/foo/releases/20181003172452
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.227s
00:10 deploy:log_revision
01 echo "Branch master (at f8c6a45edc27c11667c706d31dbf5a4d34001f00) deployed as release 20181003173654 by [user]" >> /home/[user]/apps/foo/revisionβ¦
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.232s
Post-SSHKit
Capfile
:
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Git
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# to allow for setting a specific location of bundler
require 'sshkit'
require 'sshkit/dsl'
include SSHKit::DSL
# bundler-specific settings (for server)
# https://github.com/capistrano/bundler
require "capistrano/bundler"
# Phusion Passenger tasks
# https://github.com/capistrano/passenger
# require "capistrano/passenger"
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
staging.rb
:
set :ssh_user, 'foobar'
set :use_sudo, false
# set :ruby_version, '/usr/local/bin/ruby233'
server "supersonic.webhostserver.biz", user: fetch(:ssh_user), roles: %w{app, web, db}
# force tem directory to be located home directory; useful on a shared host like Site5.com
set :tmp_dir, "/home/#{fetch(:ssh_user)}/tmp"
# where the application will reside
set :deploy_to, "/home/#{fetch(:ssh_user)}/apps/#{fetch(:application)}"
set :shared_path, "/home/#{fetch(:ssh_user)}/apps/#{fetch(:application)}/shared"
#
# sshkit - set desired bundler path
#
SSHKit.config.command_map[:bundle] = "/usr/local/bin/ruby233 /usr/local/bin/bundle233"
# Install the current Bundler environment. By default, gems will be installed to
# the shared/bundle path. Gems in the development and test group will not be
# installed. The install command is executed with the --deployment and --quiet
# flags. You can override any of these defaults by setting the variables shown
# below.
set :bundle_flags, '--deployment --quiet'
set :bundle_without, [:development, :test]
$ bundle exec cap staging deploy
:
00:00 git:wrapper
01 mkdir -p /home/[user]/tmp
01 stdin: is not a tty
β 01 [user]@supersonic.webhostserver.biz 0.893s
Uploading /home/[user]/tmp/git-ssh-csb-staging-craibuc.sh 100.0%
02 chmod 700 /home/[user]/tmp/git-ssh-csb-staging-craibuc.sh
02 stdin: is not a tty
β 02 [user]@supersonic.webhostserver.biz 0.230s
00:01 git:check
01 git ls-remote git@bitbucket.org:craibuc/csb.git HEAD
01 stdin: is not a tty
01 f8c6a45edc27c11667c706d31dbf5a4d34001f00 HEAD
β 01 [user]@supersonic.webhostserver.biz 2.508s
(Backtrace restricted to imported tasks)
cap aborted!
TypeError: no _dump_data is defined for class Thread::Mutex
Tasks: TOP => deploy:check:directories
(See full trace by running task with --trace)
The deploy has failed with an error: no _dump_data is defined for class Thread::Mutex
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
DEBUG [f0b9c1a3] stdin: is not a tty
INFO [f0b9c1a3] Finished in 0.232 seconds with exit status 0 (successful).
INFO ---------------------------------------------------------------------------
INFO START 2018-10-03 12:46:04 -0500 cap staging deploy
INFO ---------------------------------------------------------------------------
INFO [64a8fb1b] Running /usr/bin/env mkdir -p /home/[user]/tmp as [user]@supersonic.webhostserver.biz
DEBUG [64a8fb1b] Command: /usr/bin/env mkdir -p /home/[user]/tmp
DEBUG [8995ded5] stdin: is not a tty
INFO [8995ded5] Finished in 0.893 seconds with exit status 0 (successful).
DEBUG Uploading /home/[user]/tmp/git-ssh-csb-staging-craibuc.sh 0.0%
INFO Uploading /home/[user]/tmp/git-ssh-csb-staging-craibuc.sh 100.0%
INFO [04a0a348] Running /usr/bin/env chmod 700 /home/[user]/tmp/git-ssh-csb-staging-craibuc.sh as [user]@supersonic.webhostserver.biz
DEBUG [04a0a348] Command: /usr/bin/env chmod 700 /home/[user]/tmp/git-ssh-csb-staging-craibuc.sh
DEBUG [207e6200] stdin: is not a tty
INFO [207e6200] Finished in 0.230 seconds with exit status 0 (successful).
INFO [8d522656] Running /usr/bin/env git ls-remote git@bitbucket.org:craibuc/csb.git HEAD as [user]@supersonic.webhostserver.biz
DEBUG [8d522656] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/home/[user]/tmp/git-ssh-csb-staging-craibuc.sh" ; /usr/bin/env git ls-remote git@bitbucket.org:craibuc/csb.git HEAD )
DEBUG [02b5e475] stdin: is not a tty
DEBUG [02b5e475] f8c6a45edc27c11667c706d31dbf5a4d34001f00 HEAD
INFO [02b5e475] Finished in 2.508 seconds with exit status 0 (successful).
from bundler.
I'm curious why you added this?
require 'sshkit'
require 'sshkit/dsl'
include SSHKit::DSL
SSHKit is an inherent part of Capistrano and there is no need to require
it. Try removing these lines and see what happens.
from bundler.
Why did I include it? Lack of knowledge.
That worked.
Thanks for the help.
from bundler.
Related Issues (20)
- Gemfile not found HOT 1
- Benefit not clear in Readme file HOT 1
- bundle install doesn't seem to run HOT 1
- Generating binstubs on deployment seems destined to break when old releases are removed HOT 1
- rails upgrade and failed to deploy HOT 6
- Bundler 2.1 has deprecated --deployment, --path, and --without HOT 36
- verifying the non-interactive server environment -- help me help you HOT 1
- How can I set bundle_without option based on role? HOT 2
- Required ext-ruby-2.2.1 is not installed. HOT 1
- Changelog seems out of date HOT 2
- Change default bundle_jobs to nil to take advantage of Bundler's default behavior HOT 4
- Bundler emits warning about "replacing the local value of without" HOT 1
- bundle install (bundle 1.16.1, AlmaLinux 8), installs to vendor/bundle
- `bundle check` succeeds when it should fail on gem updates HOT 2
- Please tag version 1.1.3 HOT 9
- Question: How to execute a binary in the bundle in after:deploy stage HOT 2
- Feature: rate limit for bundle:install task when using lots of servers HOT 1
- `bundle check` always fails (and why do we even need this extra step?) HOT 19
- Explain that .bundle should be added to linked_dirs HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundler.