0.1.4), already activated jwt-1.0.0". Im get 'Gem :: LoadError: can't activate jwt (~> 0.1.4...">

Getting "Gem :: LoadError: cannot activate jwt (~> 0.1.4), already activated jwt-1.0.0".

Im get 'Gem :: LoadError: can't activate jwt (~> 0.1.4), jwt-1.0.0 is already activated. when i tried to run Cucumber-Ruby test. Ive the following entries in my Gemfile.lock

jwt (1.0.0)
...
signet (0.4.5)
   addressable (>= 2.2.3)
   faraday (~> 0.8.1)
   jwt (>= 0.1.5)
   multi_json (>= 1.0.0)

      

Installed Ive jwt-1.0.0. Any ideas how to solve this? Many thanks!

+3


source to share


2 answers


The Signet Gem (called Google API Client dependency for me) is naughty and specifies the Gem Gempec version outside of the Gemspec.

# in lib/signet/oauth_2/client.rb line 25
gem 'jwt', '~> 0.1.4'
require 'jwt'

      



Use the Gitub version of the Signet harness in your Gemfile that has this banishing call removed.

gem 'signet', git: "https://github.com/google/signet.git"

      

+1


source


Try to rollback jwt explicitly in your Gemfile, something like this:

gem 'jwt', '~> 0.1.13'

      



I had a similar problem with google-api-client, not signet: Gemfile.lock had jwt (>= 0.1.5)

when the google-api gemfile client said 'jwt', '~> 0.1.5'

and Gemfile.lock would probably follow. When the Gemfile changes above, the jwt value is indeed equal ~> 0.1.5

and does not fall into 1. *.

0


source







All Articles