rust-lang/rustlings

rustlings init fails

briggs-w opened this issue · 4 comments

I have downloaded and unzipped rustlings-main.zip from https://github.com/rust-lang/rustlings on 2024-12-05; version is 6.4.0. Rust is up to date (version 1.83.0 from 2024-11-26). Platform is Windows 10.

cargo rust install seemed to work

README.md says to do this command next:

rustlings init

It gives this error message:

Error: You are trying to run Rustlings using the old method before version 6.
The new method doesn't include cloning the Rustlings' repository.
Please follow the instructions in `README.md`:
https://github.com/rust-lang/rustlings#getting-started

There is no rustlings folder subfolder of rustlings-main. The rustlings command does exist (rustlings --version gives rustlings 6.4.0).

Thanks!

👋🏼 you should delete the repo and rerun the rustlings init command, it should work.

Done! For good measure, I reinstalled rust and downloaded rustlings again. Unfortunately, the error message has not changed.

mo8it commented

Do not download Rustlings from the Github release page.

Please follow these steps:

  1. Remove everything you downloaded related to Rustlings.
  2. Check that Rust is installed by running cargo --version. It should show you the current version 1.83.0
  3. Run cargo install rustlings
  4. Finally, run rustlings init to initialize the directory with the exercises.
  5. Follow the instructions shown by Rustlings.

That worked beautifully. Thanks!