4
3

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.

Gemfileでインストールするgemを間違えた時の対処法

Last updated at Posted at 2020-02-16

本記事の対象者

「インストールしようと思っていたgemを間違えてしまった」
「Gemfileでインストールしたgemを削除したい」
そんな方に向けてこの記事を書いています。

ステップ1:Gemfileから削除する

はじめに、Gemfileから間違ってインストールしたgemの記載を削除します。

ステップ2:Gemfile.lockから削除する

次に、Gemfile.lockの記載を更新します。Gemfile.lockは手動で修正せずに、以下のコマンドを実行して、自動で修正するようにしてください。

$ bundle install

もしくは

$ bundle install --path vendor/bundle

まとめ

Gemfileでインストールするgemを間違えた際には、以上のたった2ステップを実行することで対処できます。

4
3
2

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
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?