Why does the pessimistic version constraint (~>) in Ruby not match?

I’m installing a gem and I received the following error:

ERROR:  While executing gem ... (Gem::ImpossibleDependenciesError)
    oauth2-0.9.4 requires multi_json (~> 1.3) but it conflicted:
    Activated multi_json-1.11.0 instead of (>= 0, ~> 0) via:

My understanding is that the pessimistic version constraint ~> should match all except the last digit so that 1.3 should match 1.11 (and 1.11.0?) but not 2.0. What is this error message describing?


Source: ruby

Leave a Reply