質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Q&A

解決済

1回答

8714閲覧

railsでbundle installができない

cryptoriman

総合スコア11

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

0グッド

0クリップ

投稿2017/04/25 04:26

編集2017/04/25 04:30

###起きている現象

windows7にruby on railsの環境を構築しようと考え一通りの必要なことをしたのですが、bundle installができずアプリケーションづくりができずにいます。
不足している情報があれば、ご教示ください。

###発生している問題・エラーメッセージ

>bundle install --- ERROR REPORT TEMPLATE ------------------------------------------------------ - # Error Report ## Questions Please fill out answers to these questions, it'll help us figure out why things are going wrong. - **What did you do?** I ran the command `C:/Ruby23/bin/bundle install` - **What did you expect to happen?** I expected Bundler to... - **What happened instead?** Instead, what happened was... - **Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?** I tried... - **Have you read our issues document, https://github.com/bundler/bundler/blob/m aster/doc/contributing/ISSUES.md?** ... ## Backtrace Errno::ECONNABORTED: An established connection was aborted by the software in yo ur host machine. - SSL_connect C:/Ruby23/lib/ruby/2.3.0/net/http.rb:933:in `connect_nonblock' C:/Ruby23/lib/ruby/2.3.0/net/http.rb:933:in `connect' C:/Ruby23/lib/ruby/2.3.0/net/http.rb:863:in `do_start' C:/Ruby23/lib/ruby/2.3.0/net/http.rb:858:in `start' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/net-http- persistent/lib/net/http/persistent.rb:700:in `start' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/net-http- persistent/lib/net/http/persistent.rb:631:in `connection_for' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/net-http- persistent/lib/net/http/persistent.rb:994:in `request' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/fetcher/download er.rb:50:in `request' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/fetcher/download er.rb:16:in `fetch' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/fetcher/compact_ index.rb:116:in `call' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/compact_index_cl ient/updater.rb:43:in `block in update' C:/Ruby23/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/compact_index_cl ient/updater.rb:30:in `update' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/compact_index_cl ient.rb:81:in `update' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/compact_index_cl ient.rb:68:in `update_and_parse_checksums!' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/fetcher/compact_ index.rb:68:in `available?' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/fetcher/compact_ index.rb:15:in `call' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/fetcher/compact_ index.rb:15:in `block in compact_index_request' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/fetcher.rb:157:i n `use_api' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems. rb:341:in `block in api_fetchers' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems. rb:341:in `select' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems. rb:341:in `api_fetchers' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems. rb:346:in `block in remote_specs' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/index.rb:10:in ` build' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems. rb:345:in `remote_specs' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems. rb:82:in `specs' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:26 3:in `block (2 levels) in index' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:26 1:in `each' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:26 1:in `block in index' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/index.rb:10:in ` build' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:25 8:in `index' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:25 2:in `resolve' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:17 6:in `specs' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:16 4:in `resolve_remotely!' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer.rb:226 :in `resolve_if_need' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer.rb:78: in `run' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer.rb:24: in `install' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli/install.rb:7 0:in `run' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:181:in `b lock in install' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/settings.rb:99:i n `temporary' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:180:in `i nstall' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/ thor/command.rb:27:in `run' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/ thor/invocation.rb:126:in `invoke_command' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/ thor.rb:359:in `dispatch' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:20:in `di spatch' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/ thor/base.rb:440:in `start' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:11:in `st art' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/exe/bundle:32:in `block in < top (required)>' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/friendly_errors. rb:121:in `with_friendly_errors' C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/exe/bundle:24:in `<top (requ ired)>' C:/Ruby23/bin/bundle:22:in `load' C:/Ruby23/bin/bundle:22:in `<main>' ## Environment Bundler 1.14.6 Rubygems 2.6.11 Ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32] GEM_HOME C:/Ruby23/lib/ruby/gems/2.3.0 GEM_PATH C:/Ruby23/lib/ruby/gems/2.3.0;C:/Users/0124401/.gem/ruby/2.3.0 Git not installed Platform x86-mingw32 OpenSSL OpenSSL 1.0.2j 26 Sep 2016 --- 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 err or: https://github.com/bundler/bundler/search?q=An+established+connection+was+aborte d+by+the+software+in+your+host+machine.+-+SSL_connect&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 d ata! The new issue form is located at: https://github.com/bundler/bundler/issues/new

###該当のソースコード

bundle install

###補足情報(言語/FW/ツール等のバージョンなど)
ruby 2.3.3p222
rails 5.0.2
gem -v 2.6.11

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

moke

2017/04/25 04:56 編集

原因はまんまこれです。An established connection was aborted by the software in yo ur host machine. - SSL_connect、 rubyというよりwindowsのせいです。 昔と違い、現在はwindowsでも十分に作成可能ですが、 windowsOSに関する造詣がないようでしたら、macかubuntuで開発 せめて、windows8.1以降64bitにすることをオススメします。
moke

2017/04/25 04:51

回答が欲しい場合は、どういう風に構築したかを詳しく書いてください。せめて参考にしたサイトを明記して、どういった手順を踏んだかを書いていただかないと。
cryptoriman

2017/04/25 05:02 編集

初質問で至らぬ点があり申し訳ありません。参考にしたサイト3つ:http://qiita.com/machu/items/91038f4d4a3b9b5bd6f1 と https://www.oiax.jp/rails/zakkan/rails_4_2_installation_on_windows.html と http://dev.classmethod.jp/server-side/ruby-on-rails/windows_ruby-on-rails_run/ です。どれも内容的には同じ感じです。 以下のような流れで構築いたしました。 ① http://rubyinstaller.org/downloads/ から最新版のrubyをダウンロードしました。 ②Development Kitを適用 ③ gem update --systemによりRubygemsの更新 ④gem install bundlerのBundlerをインストール ⑤gem install rails --no-ri --no-rdocでRailsをインストール
moke

2017/04/25 05:06

Devkitはどうやってインストールしましたか?RubyInstallersは使いましたか?gem install railsをやるとどうですか?cmdは管理者として実行していますか?そういうことが知りたいんですけど
cryptoriman

2017/04/25 05:31 編集

rubyのインストール時はRubyInstallersを使いました。Devkitはhttp://rubyinstaller.org/downloads/にあった「DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe」を使いインストールしました(展開先C:\DevKit)。gem install railsを実行すると以下のようなエラーメッセージがでます。ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - Errno::ECONNABORT ED: An established connection was aborted by the software in your host machine. - SSL_connect (https://api.rubygems.org/specs.4.8.gz) cmdも管理者として実行してみましたが、同じエラーがでました。
moke

2017/04/25 05:41

そうですか、ですとおそらく、ファイアーオールかセキュリティソフトが原因ではないでしょうか?、セキュリティを全て切る、それでも無理なら、セーフモードで起動してbundleしてみてください。
cryptoriman

2017/04/25 05:57

分かりました。ちなみにプロキシは原因となりうるでしょうか?
moke

2017/04/25 06:04

あると思います。そうか、プロキシサーバーは考えなかったです
moke

2017/04/25 06:05 編集

set http_proxy=http://プロキシサーバ:ポート set http_proxy_user=プロキシサーバ用のユーザID set http_proxy_pass=プロキシサーバ用のパスワード gem install rails
cryptoriman

2017/04/25 06:08

分かりました。またすこし自分で調べてトライしてみます。長々付き合っていただきありがとうございました。助かります。
guest

回答1

0

ベストアンサー

An established connection was aborted by the software in yo ur host machine. - SSL_connect

原因はまんまこれです。

とりわけ特殊なことをしていないなら
セキュリティかネットワークが原因です。
プロキシを利用している場合

cmd

1set http_proxy=http://プロキシサーバ:ポート 2set http_proxy_user=プロキシサーバ用のユーザID 3set http_proxy_pass=プロキシサーバ用のパスワード 4gem install rails

とやるそうです。

投稿2017/04/25 06:12

moke

総合スコア2241

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

cryptoriman

2017/04/25 06:17

さきほどのご教示されたやり方で試してみたところbundle installが成功しました。このエラーで何日も悩まされていましたが、解決していただきありがとうございました。
moke

2017/04/25 06:20 編集

やー、よかったです。 詰まったときはお互い様です。 enjoy Ruby !!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問