Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle install problems #67

Open
jrochkind opened this issue May 6, 2015 · 2 comments
Open

bundle install problems #67

jrochkind opened this issue May 6, 2015 · 2 comments

Comments

@jrochkind
Copy link

I'm not sure if this is a capistrano-rvm problem or a capistrano-bundler problem, or what, but I'll try reporting it here, for advice on how to figure out more on what's going on.

I have require 'capistrano/rvm' in my Capfile, followed by require 'capistrano/rails'.

When I try a cap deploy, it is unable to do the bundle install:

DEBUG [ec7b1264] Command: cd /opt/umlaut_jh/releases/20150506173737 && ~/.rvm/bin/rvm default do bundle install --path /opt/umlaut_jh/shared/bundle --without development test --deployment --quiet
DEBUG [ec7b1264]    An error occurred while installing uglifier (2.7.1), and Bundler cannot
DEBUG [ec7b1264]    continue.
DEBUG [ec7b1264]    Make sure that `gem install uglifier -v '2.7.1'` succeeds before bundling.
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host blacklight.library.jhu.edu: bundle exit status: 5
bundle stdout: An error occurred while installing uglifier (2.7.1), and Bundler cannot
continue.
Make sure that `gem install uglifier -v '2.7.1'` succeeds before bundling.
bundle stderr: Nothing written
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
SSHKit::Command::Failed: bundle exit status: 5
bundle stdout: An error occurred while installing uglifier (2.7.1), and Bundler cannot
continue.
Make sure that `gem install uglifier -v '2.7.1'` succeeds before bundling.
bundle stderr: Nothing written
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/command.rb:95:in `exit_status='
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:179:in `block in _execute'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/jrochkind/.gem/ruby/2.2.2/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/jrochkind/.gem/ruby/2.2.2/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/jrochkind/.gem/ruby/2.2.2/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/jrochkind/.gem/ruby/2.2.2/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => deploy:updated => bundler:install
The deploy has failed with an error: Exception while executing on host blacklight.library.jhu.edu: bundle exit status: 5
bundle stdout: An error occurred while installing uglifier (2.7.1), and Bundler cannot
continue.
Make sure that `gem install uglifier -v '2.7.1'` succeeds before bundling.
bundle stderr: Nothing written
** Invoke deploy:failed (first_time)
** Execute deploy:failed

If I log in to an interactive bash shell directly under the same cap user, I an do a gem install uglifier -v '2.7.1' no problem.

I can also, interactively, even do a cd /opt/umlaut_jh/releases/20150506173737 && ~/.rvm/bin/rvm default do bundle install --path /opt/umlaut_jh/shared/bundle --without development test --deployment without a problem. Once I've manually run that bundle command, I can subsequently do a cap deploy, because the gems are all there already -- but I expect that I'll have a problem again whenever I have a new gem in a cap deploy, so that's not good.

Any ideas of what might be going on, or how I might investigate or debug this further?

@jrochkind
Copy link
Author

It's not always uglifier, if I wipe out the deploy directory and try again, it can be a different gem each time.

I realized I could try again with: set :bundle_flags, '--deployment --verbose'

Aha, now I see:

Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/gems/umlaut_borrow_direct-1.0.0.gem)

Okay, I'll have to investigate that. I'm not able to reproduce that in an interactive shell, only via capistrano -- is there anything that might effect gem fetching of an https .gem file differently via cap vs via an interactive shell, that I should look at?

@mib32
Copy link

mib32 commented Aug 16, 2017

@jrochkind Hey! Did you found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants