Gemfile.lock dependency conflicts

AI-generated summary

The discussion revolves around resolving a dependency conflict in the Gemfile.lock file. arivanandan encountered the issue after updating, as the discourse-omniauth-jwt gem requires jwt version 2.2.1, but the updated Discourse uses version 2.3.0.

Benjamin_D suggested forking the discourse-omniauth-jwt gem and updating the dependency to 2.3.0. arivanandan attempted this and found it to be successful. They also discovered how to publish their own Ruby gem and explored alternative methods for importing gems using a Git URL. However, they question why this approach may not work due to how Discourse installs dependencies.

I do not much experience with Ruby so bear with me. I haven’t updated in 2 or 3 months. When I did, there’s a conflict.

discourse-omniauth-jwt needs the jwt gem at 2.2.1

I’m guessing with this commit to Gemfile.lock, discourse now uses version 2.3.0 of jwt.

I’m guessing updating jwt on discourse-omniauth-jwt isn’t really an option since it isn’t updated. What should I do here?

I’d try my luck, fork it and bump the dependency to 2.3.0
From what I can tell what motivated the 2.2.1 (which was the latest at the time of the commit in 2019) has not changed.

True. Let me give that a shot.

That worked out! I also figured out how to publish my own ruby gem whilst figuring this out.

I see that gems can also be imported with a git URL such as

gem "discourse-omniauth-jwt", "0.0.3", git: "https://github.com/discourse/discourse-omniauth-jwt"

Does this not work as a result of how discourse installs dependencies?