4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rubygemが反応しない問題

Posted at

###エラー
xcodeのプラグインをgemで入れようとしたら、downloadデータが使えないよとエラーが。
まったく。

terminal
$ gem install update_xcode_plugins
ERROR:  Could not find a valid gem 'update_xcode_plugins' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

###対処法
SSL証明書の有効期限が切れているのが原因のようなので、httpsではなく、httpをソースに変更してアップデートする。
※SSL証明書の更新?をするやり方もあるんでしょうが。

terminal
$ gem sources --remove https://rubygems.org/
https://rubygems.org/ removed from sources
$ gem sources --add http://rubygems.org
https://rubygems.org is recommended for security over http://rubygems.org
Do you want to add this insecure source? [yn]  y
http://rubygems.org added to sources
$ sudo gem update --system
Updating rubygems-update
Successfully installed rubygems-update-2.7.6
Installing RubyGems 2.7.6
Bundler 1.16.1 installed
RubyGems 2.7.6 installed
Regenerating binstubs
(以下略)

リモートのlistも生き返ったのでこれで一安心。

terminal
$ gem list --remote

*** REMOTE GEMS ***

- (1)
.cat (0.0.1)
(以下略)

###参考
RubyGem のSSL証明書の有効期限切れ
http://d.hatena.ne.jp/obelisk2+marginalia/20170118/1484717722
rubygem が反応しなくなったら http://jimiprg.blog.shinobi.jp/Entry/21/#QqHqAgj.twitter_tweet_count_m

4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?