20
21

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.

gemやらhomebrewなどのバージョンアップを忘れずに

Last updated at Posted at 2015-05-06

何か新しいパッケージやライブラリの類を入れる際には、各種バージョンアップを忘れずに。
順序は 管理ツールを更新 紐づくものを更新 クリーンアップ の順で。

homebrewと管理しているパッケージを更新

まず、homebrew自体を更新


$ brew update

続いて、homebrewで管理しているパッケージをまとめて更新(引数を与えずすべて更新)


$ brew upgrade

最後にクリーンアップ(古いバージョンのfomula:パッケージのこと)を削除


$ brew upgrade fomula

「RubyGems」そのものと管理しているパッケージを更新

ライブラリを管理しているRubyGemsそのものが古いと、管理しているライブラリの更新、新規追加そのものがうまくいかないこともあるみたいです。

まず、RubyGemsそのものを更新するためにrubygems-updateを更新


$ gem install rubygems-update

Fetching: rubygems-update-2.4.6.gem (100%)
Successfully installed rubygems-update-2.4.6
Parsing documentation for rubygems-update-2.4.6
Installing ri documentation for rubygems-update-2.4.6
Done installing documentation for rubygems-update after 0 seconds
1 gem installed

続いて、RubyGemsの更新


$ update rubygems

紐付いているライブラリの更新(下記のケースではすべて更新しているので、15分くらいかかりました)


$ gem update

RubyGemsそのものを更新する方法 別解

最新のバージョンにする場合。


$ gem update --system

クリーンアップもわすれずにね

homebrewに関するクリーンアップ


$ brew cleanup

gemに関するクリーンアップ


$ gem cleanup

参考

Homebrewまとめ http://qiita.com/vintersnow/items/fca0be79cdc28bd2f5e4 RubyGemsのアップデートについて http://www.task-notes.com/entry/20150111/1420967228
20
21
1

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
20
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?