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

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

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

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

0回答

229閲覧

bundle install --without production 実行時のエラーCould not fetch specs from https://rubygems.org/について

Asahi_sun_

総合スコア5

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/07/27 11:00

前提・実現したいこと

cloud9でrails tutorialに沿ってrails new を実行し、gemfileを編集しbundle install --without productionを実行したところエラーになってしまったので解決方法を知りたいです。今までbundle installはできていました。

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

Fetching source index from https://rubygems.org/ Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ Could not fetch specs from https://rubygems.org/

bundle update を実行しても同じエラーが起こります。
また、ググるとgem update --systemを行うと直ると書いてあったので試したところ次のエラーが表示されました。

ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError) no such name (https://rubygems.org/specs.4.8.gz)

該当のソースコード

source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '6.0.3.2' # Use Puma as the app server gem 'puma', '4.3.5' # Use SCSS for stylesheets gem 'sass-rails', '6.0.0' # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem 'webpacker', '4.2.2' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '5.2.1' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '2.10.0' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Active Storage variant # gem 'image_processing', '~> 1.2' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '1.4.6', require: false group :development, :test do # Use sqlite3 as the database for Active Record gem 'sqlite3', '1.4.2' # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', '11.1.3', platforms: [:mri, :mingw, :x64_mingw] end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '4.0.2' gem 'listen', '3.2.1' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring', '2.1.0' gem 'spring-watcher-listen', '2.0.1' end group :test do # Adds support for Capybara system testing and selenium driver gem 'capybara', '3.32.2' gem 'selenium-webdriver', '3.142.7' # Easy installation and use of web drivers to run system tests with browsers gem 'webdrivers' '4.3.0' gem 'rails-controller-testing', '1.0.4' gem 'minitest', '5.11.3' gem 'minitest-reporters', '1.3.8' gem 'guard', '2.16.2' gem 'guard-minitest', '2.4.6' end group :production do gem 'pg', '1.2.3' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data'

これはrails tutorialのものと同じです。

試したこと

PCの再起動、wi-fiの再接続、スマホのwi-fiでやってみた

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問