2

I am following the Rocket getting started guide to learn the Rocket web framework for Rust. When I execute cargo run --verbose I get the following error:

PS C:\Users\kin\Desktop\hello-rocket> cargo run --verbose
Updating registry `https://github.com/rust-lang/crates.io-index`
failed to parse registry's information for: serde

Caused by:
  the given version requirement is invalid

System details

Desktop Environment:   Windows 10
Cargo Version      :   cargo 0.8.0-nightly (28a0cbb 2016-01-17)
rustc Version      :   rustc 1.7.0 (a5d1e7a59 2016-02-29)

Cargo.toml

[package]
name = "hello-rocket"
version = "0.1.0"
authors = ["XXX"]

[dependencies]
rocket = "0.3.5"
rocket_codegen = "0.3.5"
Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
Casper
  • 4,435
  • 10
  • 41
  • 72
  • The best place to ask this question is the [rocket issues page](https://github.com/SergioBenitez/Rocket). – VP. Dec 25 '17 at 08:40
  • 1
    What version of Rust? What version of Cargo? What's in `Cargo.toml`? – DK. Dec 25 '17 at 09:20

2 Answers2

2

I am following the Rocket getting started guide

The very first section of the guide you linked to states (emphasis mine):

Rocket makes abundant use of Rust’s syntax extensions and other advanced, unstable features. Because of this, we’ll need to use a nightly version of Rust.

Slightly later, it states:

Rocket always requires the latest version of Rust nightly.

Yet you have a stable version of Rust (1.7.0); one that is almost 22 months old at this point (2016-02-29). Rust 1.22.1 is the current stable version of Rust.

The guide continues on to describe how to install the latest nightly; I suggest following it.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
  • Unable to upgrade Rustc by using `rustup update` in Windows PowerShell. I finally solved it by reinstall Rust using the `rustup‑init.exe` installer. – Casper Dec 26 '17 at 12:39
  • This time I encountered the problem: https://stackoverflow.com/questions/47941738/cannot-compile-the-ring-crate-file-not-found-for-module-montgomery – Casper Dec 26 '17 at 12:55
1
Casper
  • 4,435
  • 10
  • 41
  • 72