1
0

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 1 year has passed since last update.

Railsアプリで使っているライブラリのバージョンを一覧表示する

Posted at

受託開発などで仕事を請けたりしていると、提出するドキュメント(設計書など)に、使用しているソフトウェアのバージョンの記載を求められることがあります。

僕が以前請けた仕事でも、Railsアプリケーションで使用しているライブラリ一覧を記載する必要がありました。

毎回やり方を調べているので、コマンドをメモしておきます。

bundle installでインストールしたgem

コマンド

bundle exec gem list

出力例

actioncable (5.2.3)
actionmailer (5.2.3)
actionpack (5.2.3)
actionview (5.2.3)
activejob (5.2.3)
activemodel (5.2.3)
activemodel-serializers-xml (1.0.2)
activerecord (5.2.3)
...

yarnでインストールしたパッケージ

コマンド

yarn list --depth=0

※依存関係の深さは0にしていますが目的に合わせて変更します。

出力例

yarn list v1.21.1
├─ @babel/code-frame@7.5.5
├─ @babel/core@7.6.4
├─ @babel/generator@7.6.4
├─ @babel/helper-annotate-as-pure@7.0.0
├─ @babel/helper-builder-binary-assignment-operator-visitor@7.1.0
├─ @babel/helper-call-delegate@7.4.4
├─ @babel/helper-create-class-features-plugin@7.6.0
├─ @babel/helper-define-map@7.5.5
...

あとは出力されたリストを適宜加工してドキュメントに貼り付ければ完了です。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?