Search code examples
rustrust-rocket

Why am I unable to build Rocket project because of ring dependency error?


I'm following this tutorial here and have also looked into Rocket's official guide of setting up a web server. I've set as default the nightly builds. But I get the following error:

error: failed to select a version for the requirement `ring = "^0.11.0"`
  candidate versions found which didn't match: 0.16.11, 0.16.10, 0.16.9, ...
  location searched: crates.io index
required by package `cookie v0.9.1`
    ... which is depended on by `rocket v0.3.6`
    ... which is depended on by `my-project`

Obviously there's some mismatch with the dependencies, but since ring is something required by the framework itself, I'm not sure how to debug this... furthermore, I'm using the latest versions of cargo and rust:

cargo 1.43.0-nightly (... 2020-02-18)
rustc 1.43.0-nightly (... 2020-02-21)

Solution

  • ring v0.11.0 was yanked from crates.io (see this issue for some background). Since some versions rocket depended on versions of ring that were yanked, those versions of rocket will no longer work.

    Upgrading to rocket v0.4.0 (or the latest v0.4.2) should solve this issue.