LoginSignup
2
0

More than 3 years have passed since last update.

bundle install --path vendor/bundleをしたら大量にファイルがインストールされてしまった!?

Posted at

bundle install --path vendor/bundleで大量のファイル

あるときGitの管理外の場所で参考記事を見ながら、bundle install --path vendor/bundleをしたら大量のファイルがインストールされてしまって、混乱したのでその解決した方法を載せようと思います。

ターミナル
$ bundle install --path vendor/bundle
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 12.3.2
Installing rake 12.3.2
Fetching concurrent-ruby 1.1.5
Installing concurrent-ruby 1.1.5
Fetching i18n 1.6.0
Installing i18n 1.6.0
Fetching minitest 5.11.3
Installing minitest 5.11.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching activesupport 5.2.3
Installing activesupport 5.2.3
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.8.0
Installing erubi 1.8.0
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.3
Installing nokogiri 1.10.3 with native extensions
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.4
Installing crass 1.0.4
Fetching loofah 2.2.3
Installing loofah 2.2.3
[省略]

原因

通常のbundleであればシステムのrubyにinstallされ流のですが、この指定で、--path vendor/bundleで作成しているアプリケーション内のvendor/bundleにインストールされていってしまうからのようでした。

解決方法

一度pathを通すとbundleディレクトリのconfigにpathが設定されるらしく、次回以降もvendor/bundleにインストールされるようになるようです。

元のシステムにインストールされるよう戻したいのなら、bundle/config内にあるvndor/bundleを消せばいいということ。

参考記事は理解しながらコマンドを打つべし

エラーが出た時に原因がなんなのかすらわからないので、参考記事は理解しながらコマンドを打つことが重要だということを思いしりました。

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