rubyのopensslのパス問題の次は、bundle installでfatal: No live threads left. Deadlock?に遭遇した


bundle installがうまくいかない場合はお試しください。今回はopensslのパスの問題と一緒に`fatal: No live threads left. Deadlock?`というエラーも出てきました。

```shell-session
# 有効なopensslコマンドのバージョンを調べます。
# これはmac osに最初から入っていたもの？
 % openssl version
OpenSSL 0.9.8zd 8 Jan 2015

# brewでインストールした場所とそのバージョンを調べます。
# 現在、2つのopensslが入っていることがわかりました。
 $ brew --prefix openssl
/usr/local/opt/openssl
 % /usr/local/opt/openssl/bin/openssl version
OpenSSL 1.0.2d 9 Jul 2015

# brew本体とfomula（パッケージ）全てをインストールします。
 % brew update

# kオプションでrubyのソースコードをダウンロード後、削除しないようにします。
 % rbenv install -k 2.1.1
 % cd ~/.rbenv/sources/2.1.1/ruby-2.1.1/

# 既に一度コンパイルしているなら削除makeをリセットします。
 % make clean

# バッククォートの部分が先に実行され、その結果が文字列として置き換わります。
# opensslにはbrewの方のパスを設定して、新しいバージョンにします。
 % ./configure --prefix=/Users/mitsuru/.rbenv/versions/2.1.1  --with-openssl-dir=`brew --prefix openssl`
 % make
 % make test
 % make install

 % bundle install
# 一部省略
Using sass-rails 4.0.3
Using turbolinks 2.2.2
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- What did you do?

  I ran the command `./bin/bundle `

- What did you expect to happen?

  I expected Bundler to...

- What happened instead?

  Instead, what actually happened was...

Error details

    fatal: No live threads left. Deadlock?
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/worker.rb:35:in `pop'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/worker.rb:35:in `deq'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/installer/parallel_installer.rb:93:in `process_specs'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/installer/parallel_installer.rb:74:in `call'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/installer/parallel_installer.rb:56:in `call'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/installer.rb:274:in `install_in_parallel'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/installer.rb:91:in `run'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/installer.rb:18:in `install'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/cli/install.rb:107:in `run'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/cli.rb:162:in `install'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/cli.rb:10:in `start'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/bin/bundle:20:in `block in <top (required)>'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
      /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday/gems/bundler-1.10.6/bin/bundle:18:in `<top (required)>'
      ./bin/bundle:3:in `load'
      ./bin/bundle:3:in `<main>'

Environment

    Bundler   1.10.6
    Rubygems  2.2.2
    Ruby      2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin14.0]
    GEM_HOME  /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday
    GEM_PATH  /Users/mitsuru/.rbenv/versions/2.1.1/gemsets/everyday:/Users/mitsuru/.rbenv/versions/2.1.1/gemsets/global:/Users/mitsuru/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0
    Git       2.3.2 (Apple Git-55)

Bundler settings

    jobs
      Set for the current user (/Users/mitsuru/.bundle/config): "3"
    gemfile
      Set via BUNDLE_GEMFILE: "/Users/mitsuru/Desktop/work/rails-4-1-rspec-3-0/Gemfile"
--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=No+live+threads+left.+Deadlock%3F&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new
```

[git hubのissue](https://github.com/bundler/bundler/issues/3692)を見てみると、jobsオプションを変更するといいと書いてありました。デフォルトだと3みたいです。そこで`bundle install --jobs=1`を試してみたところ、無事インストールが完了しました。