0
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 3 years have passed since last update.

[gem][bundler]古いbundler を使用する bundle _1.17.3_ install でエラー 解決法

Last updated at Posted at 2020-06-29

問題

bundle install 実行のbundler をダウングレードしたい。
(Gemfile で指定の各gemの bundler依存関係のため):

Mac で gem install bundler で入れる bundler が最新のもの(例えば 2.1.4) になり
そのままbundle install だと通らない。

$ bundle install
Error:
Bundler could not find compatible versions for gem "bundler":
...
 Current Bundler version:
    bundler (2.1.4)

じゃあ bundler をダウングレード
gem install bundler -v 1.17.3
gem install bundler:1.17.3 --default などと
とversion 指定にしてインストールして
bundle _1.17.3_ install
としてversion 指定の実行 でもなぜかエラー

$ bundle _1.17.3_ install
...
could not load such file
...

解決法

gem 自体をupgrade すれば
問題解決できた。

gem update --system でうまくいかなかったので
gem install rubygems-update

$ gem -v
2.x.x
$ gem install rubygems-update
$ update_rubygems
$ gem -v
3.1.4

$ bundle _1.17.3_ install
...
Bundle complete! ...

環境

MacOSX 10.10.5
ruby 2.5.8
rails 4.2.11.3

参考

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