kakudooo docs

RubyとBundlerの互換性

RubyとBundlerの互換性について気になったので、調べてみた。

互換性について

以下は、Bundlerの公式ドキュメントの内容から。

RubyとBundler

The latest Bundler release should always support, at the very least, all rubies that have not yet reached their End of Life date.

「最新のBundlerは少なくともその時点でEOLに達していないRubyのバージョンをサポートすべき」という方針であることがわかる。

BundlerとRubyGems

Bundlerは内部でRubyGemsの機能に依存している。Bundlerの互換性を扱う上で、RubyGemsに関しても同様に考慮する必要がある。

The latest Bundler release should always support all RubyGems versions higher than or equal to the one shipped with the oldest Ruby version supported.

参照: https://bundler.io/compatibility.html

「最新のBundlerは、サポート対象のRubyの中で一番古いバージョンに同梱されているRubyGems以上のバージョンをサポートすべきである」という方針であることがわかる。

まとめ

Bundlerを新しいバージョンに上げる場合は、互換性の一覧を確認し、現在使用しているRubyのバージョンがサポート対象になっているかどうかを確認する。

RubyGemsに関しては、サポート対象のRubyに同梱されているRubyGemsをそのまま使っていれば、基本的にはBundlerとの互換性が維持される。ただし、RubyGemsを手動でダウングレードしている場合は、BundlerがサポートするRubyGemsの下限を下回っていないか確認する必要がある。