LoginSignup
1
0

More than 1 year has passed since last update.

bundle install 時に ruby_dep-1.5.0 でエラーが出た際の対処法

Posted at

これはなに

アプリケーションの ruby のバージョンを3系に上げる際に発生した、ruby_dep-1.5.0 エラーの対処法の備忘録です。

問題のエラー

ruby のバージョンを2系から3系に上げるために
bundle installを実行した際、以下のエラーが発生しました。

bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
ruby_dep-1.5.0 requires ruby version >= 2.2.5, ~> 2.2, which is incompatible with the current version, ruby 3.0.5p211

ruby_dep が必要としている ruby のバージョンに、3系が含まれていないことにより発生しているようです。

調査

ruby_dep の依存関係を確認する

以下のコマンドで ruby_dep の依存関係を確認します。

bundle update ruby_dep

以下が実行結果です。

Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 3.0.5.0)

    listen (>= 3.0.5, < 3.2) was resolved to 3.1.5, which depends on
      ruby_dep (~> 1.2) was resolved to 1.2.0, which depends on
        Ruby (>= 2.2.3, ~> 2.2)

どうやら、listen と依存関係にあるようです。

listen を update

まず依存関係にある listen を update します。

bundle update listen

以下が実行結果です。

Using listen 3.0.8 (was 3.1.5)

3.1.5 → 3.0.8 に更新されました。
Gemfile.lock を確認したところ、ruby_dep への依存関係が無くなったようです。

再度 bundle install を行う

listen が ruby_dep を必要としない状態にできたので、
再度 bundle install を試してみました。

結果、エラーは出なくなり、正常に bundle install を完了することができました。

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