Skip to content

Dependency Conflict: africastalking requires json ~> 1.8 but newer RuboCop requires json ~> 2.3 #59

@mainangethe

Description

@mainangethe

Environment

  • Ruby Version: v3.2.2

  • Rails Version: v8.0.0

  • Error Log:

Could not find compatible versions

    Because every version of africastalking depends on httparty ~> 0.13.7
      and httparty >= 0.12.0, < 0.14.0 depends on json ~> 1.8,
      every version of africastalking requires json ~> 1.8.
(1) So, because rubocop >= 1.31.1 depends on json ~> 2.3,
      every version of africastalking is incompatible with rubocop >= 1.31.1.

    Because rubocop-rails-omakase < 1.1.0 depends on rubocop-rails >= 0
      and rubocop-rails-omakase >= 1.1.0 depends on rubocop >= 1.72,
      either rubocop-rails >= 0 or rubocop >= 1.72.
    And because every version of rubocop-rails depends on rubocop >= 1.72.1, < 2.0,
      rubocop >= 1.72 is required.
    And because every version of africastalking is incompatible with rubocop >= 1.31.1 (1),
      africastalking cannot be used.
    So, because Gemfile depends on africastalking >= 0,
      version solving has failed.

Issue Description

When adding africastalking to a fresh Rails 8 project, Bundler fails to resolve dependencies due to a conflict between the json gem versions:

  • africastalking depends on httparty ~> 0.13.7, which requires json ~> 1.8.
  • RuboCop >= 1.31.1 (via rubocop-rails-omakase) requires json ~> 2.3.

This makes the gems incompatible in modern Rails/Ruby setups.

Steps to Reproduce

  1. Create a new Rails 8 project: rails new myapp
  2. Add gem 'africastalking' to the Gemfile
  3. Run bundle install

Expected Behavior

Dependencies resolve successfully.

Workarounds Tried (Optional)

  • Forcing json to ~> 1.8 works but (I'm only using this as a temporary fix.)

Suggested Fix

Update the africastalking gem’s dependencies to:

  • Allow newer versions of httparty (which support json >= 2.0), or
  • Relax the json dependency constraints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions