i am do as this page, the way is:
git clone https://github.com/SergioBenitez/Rocket
cd Rocket
git checkout v0.3.15
cd examples/hello_world
cargo run
and my environment is:
cargo 0.26.0 (41480f5cc 2018-02-26)
macOS: 10.13.4
when i am run cargo run, the console throw these error:
โ hello_world git:(5c54335) cargo run
Compiling idna v0.1.5
Compiling rocket_codegen v0.3.15 (file:///Users/ruoru/Repositories/Rocket/codegen)
Compiling pear_codegen v0.0.19
Compiling rocket v0.3.15 (file:///Users/ruoru/Repositories/Rocket/lib)
error: failed to run custom build command for `pear_codegen v0.0.19`
process didn't exit successfully: `/Users/ruoru/Repositories/Rocket/target/debug/build/pear_codegen-d9ac53953713324b/build-script-build` (exit code: 101)
--- stderr
Error: Pear requires a nightly or dev version of Rust.
Installed version is: 1.25.0 (2018-03-25). Minimum required: 1.28.0-nightly (2018-06-23).
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', /Users/ruoru/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.19/build.rs:31:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `rocket v0.3.15 (file:///Users/ruoru/Repositories/Rocket/lib)`
process didn't exit successfully: `/Users/ruoru/Repositories/Rocket/target/debug/build/rocket-978ffb296fb0ec37/build-script-build` (exit code: 101)
--- stderr
Error: Rocket requires a nightly or dev version of Rust.
Installed version is: 1.25.0 (2018-03-25). Minimum required: 1.27.0-nightly (2018-04-26).
See the getting started guide (https://rocket.rs/guide/getting-started/) for more information.
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', lib/build.rs:38:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `rocket_codegen v0.3.15 (file:///Users/ruoru/Repositories/Rocket/codegen)`
process didn't exit successfully: `/Users/ruoru/Repositories/Rocket/target/debug/build/rocket_codegen-61fe2006b76fd928/build-script-build` (exit code: 101)
--- stderr
Error: Rocket requires a nightly or dev version of Rust.
Installed version is: 1.25.0 (2018-03-25). Minimum required: 1.29.0-nightly (2018-07-15).
See the getting started guide (https://rocket.rs/guide/getting-started/) for more information.
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', codegen/build.rs:38:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
any help will be grateful.
Rocket requires the nightly build of Rust. You are using an older version of Rust.
my rust version is rustc 1.25.0 (84203cac6 2018-03-25), the last version is 1.28, it is too old?
From your error output: Minimum required: 1.29.0-nightly
and i am update my rust to 1.28, and right now the newest is 1.28, what mean abput 1.28.0-nightly?
hello_world git:(4e0b170) cargo run
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading memchr v1.0.2
Downloading smallvec v0.4.5
Compiling version_check v0.1.4
Compiling cfg-if v0.1.5
Compiling nodrop v0.1.12
Compiling scopeguard v0.3.3
Compiling memoffset v0.2.1
Compiling rayon-core v1.4.1
Compiling libc v0.2.43
Compiling gcc v0.3.54
Compiling matches v0.1.7
Compiling unicode-normalization v0.1.7
Compiling serde v1.0.71
Compiling yansi v0.4.0
Compiling httparse v1.3.2
Compiling safemem v0.2.0
Compiling byteorder v1.2.4
Compiling untrusted v0.5.1
Compiling percent-encoding v1.0.1
Compiling traitobject v0.1.0
Compiling typeable v0.1.2
Compiling language-tags v0.2.2
Compiling smallvec v0.4.5
Compiling ordermap v0.2.13
Compiling pear v0.0.19
Compiling state v0.4.1
Compiling crossbeam-utils v0.2.2
Compiling log v0.4.3
Compiling arrayvec v0.4.7
Compiling lazy_static v1.1.0
Compiling unicase v1.4.2
Compiling unicode-bidi v0.3.4
Compiling num_cpus v1.8.0
Compiling time v0.1.40
Compiling memchr v1.0.2
Compiling isatty v0.1.8
Compiling pear_codegen v0.0.19
Compiling rocket v0.3.9 (file:///Users/ruoru/Repositories/Rocket/lib)
Compiling rocket_codegen v0.3.9 (file:///Users/ruoru/Repositories/Rocket/codegen)
Compiling base64 v0.6.0
Compiling log v0.3.9
error: failed to run custom build command for `pear_codegen v0.0.19`
process didn't exit successfully: `/Users/ruoru/Repositories/Rocket/target/debug/build/pear_codegen-81bbd5038b3ad22e/build-script-build` (exit code: 101)
--- stderr
Error: Pear requires a nightly or dev version of Rust.
Installed version is: 1.28.0 (2018-07-30). Minimum required: 1.28.0-nightly (2018-06-23).
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', /Users/ruoru/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.19/build.rs:31:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `rocket_codegen v0.3.9 (file:///Users/ruoru/Repositories/Rocket/codegen)`
process didn't exit successfully: `/Users/ruoru/Repositories/Rocket/target/debug/build/rocket_codegen-6a7cd1b83336bfcb/build-script-build` (exit code: 101)
--- stderr
Error: Rocket requires a nightly or dev version of Rust.
Installed version is: 1.28.0 (2018-07-30). Minimum required: 1.27.0-nightly (2018-04-26).
See the getting started guide (https://rocket.rs/guide/getting-started/) for more information.
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', codegen/build.rs:38:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
You're using Rust's stable release. You must use Rust's nightly release. If you're using rustup to manage your Rust compiler versions, run rustup install nightly then rustup default nightly to use the nightly build by default.
If you're not ready using rustup, I recommend you do.
See https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md for more information.
ok, thanks so much, but i meet a new error. i do not know how to solve it.
now
โ hello_world git:(4e0b170) cargo --version
cargo 1.29.0-nightly (b42488270 2018-08-04)
โ hello_world git:(4e0b170) cargo run
Compiling rocket v0.3.9 (file:///Users/ruoru/Repositories/Rocket/lib)
error[E0283]: type annotations required: cannot resolve `std::borrow::Cow<'_, str>: std::borrow::Borrow<_>`
--> lib/src/http/header.rs:544:47
|
544 | Header::new(key.as_str(), val.borrow())
| ^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0283`.
error: Could not compile `rocket`.
To learn more, run the command again with --verbose.
rocket v0.3.9. This is really out of date. cargo update.
R = @Izodn @SergioBenitez
โ hello_world git:(5c54335) rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
284.7 KiB / 284.7 KiB (100 %) 55.6 KiB/s ETA: 0 s
info: latest update on 2018-08-16, rust version 1.30.0-nightly (d767ee116 2018-08-15)
info: downloading component 'rustc'
59.0 MiB / 59.0 MiB (100 %) 4.2 MiB/s ETA: 0 s
info: downloading component 'rust-std'
46.7 MiB / 46.7 MiB (100 %) 5.5 MiB/s ETA: 0 s
info: downloading component 'cargo'
info: downloading component 'rust-docs'
8.3 MiB / 8.3 MiB (100 %) 5.3 MiB/s ETA: 0 s
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: checking for self-updates
stable-x86_64-apple-darwin unchanged - rustc 1.28.0 (9634041f0 2018-07-30)
nightly-x86_64-apple-darwin updated - rustc 1.30.0-nightly (d767ee116 2018-08-15)
โ hello_world git:(5c54335) cargo update
Updating registry `https://github.com/rust-lang/crates.io-index`
โ hello_world git:(5c54335) git reset --hard v0.3.15
HEAD is now at 5c54335 New version: 0.3.15.
โ hello_world git:(5c54335) pwd
/Users/ruoru/Repositories/Rocket/examples/hello_world
โ hello_world git:(5c54335) cargo --version
cargo 1.29.0-nightly (6a7672ef5 2018-08-14)
โ hello_world git:(5c54335) cargo run
Compiling version_check v0.1.4
Compiling nodrop v0.1.12
Compiling cfg-if v0.1.5
Compiling scopeguard v0.3.3
Compiling memoffset v0.2.1
Compiling rayon-core v1.4.1
Compiling libc v0.2.43
Compiling matches v0.1.7
Compiling gcc v0.3.54
Compiling unicode-normalization v0.1.7
Compiling serde v1.0.71
Compiling yansi v0.4.0
Compiling httparse v1.3.2
Compiling void v1.0.2
Compiling safemem v0.2.0
Compiling percent-encoding v1.0.1
Compiling untrusted v0.5.1
Compiling byteorder v1.2.4
Compiling typeable v0.1.2
Compiling language-tags v0.2.2
Compiling traitobject v0.1.0
Compiling pear v0.0.19
Compiling state v0.4.1
Compiling ordermap v0.2.13
Compiling crossbeam-utils v0.2.2
Compiling log v0.4.3
Compiling arrayvec v0.4.7
Compiling unicode-bidi v0.3.4
Compiling lazy_static v1.1.0
Compiling unicase v1.4.2
Compiling num_cpus v1.8.0
Compiling time v0.1.40
Compiling memchr v2.0.1
Compiling isatty v0.1.8
Compiling pear_codegen v0.0.19
Compiling rocket v0.3.15 (file:///Users/ruoru/Repositories/Rocket/lib)
Compiling rocket_codegen v0.3.15 (file:///Users/ruoru/Repositories/Rocket/codegen)
Compiling unreachable v1.0.0
Compiling base64 v0.6.0
Compiling base64 v0.9.2
Compiling log v0.3.9
Compiling smallvec v0.6.4
Compiling mime v0.2.6
Compiling crossbeam-epoch v0.3.1
Compiling crossbeam-deque v0.2.0
Compiling rayon v0.7.1
Compiling ring v0.11.0
Compiling toml v0.4.6
Compiling idna v0.1.5
Compiling url v1.7.1
Compiling cookie v0.9.2
Compiling hyper v0.10.13
warning: this expression is not being lifted
--> lib/src/config/toml_ext.rs:70:30
|
70 | if let Ok(int) = value_str.parse::<i64>() {
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: this expression is not being lifted
--> lib/src/config/toml_ext.rs:72:39
|
72 | } else if let Ok(float) = value_str.parse::<f64>() {
| ^^^^^^^^^^^^^^^^^^^^^^^^
Compiling hello_world v0.0.0 (file:///Users/ruoru/Repositories/Rocket/examples/hello_world)
Finished dev [unoptimized + debuginfo] target(s) in 1m 45s
Running `/Users/ruoru/Repositories/Rocket/target/debug/hello_world`
๐ง Configured for development.
=> address: localhost
=> port: 8000
=> log: normal
=> workers: 8
=> secret key: generated
=> limits: forms = 32KiB
=> tls: disabled
๐ฐ Mounting '/':
=> GET /
๐ Rocket has launched from http://localhost:8000
GET /static/js/main.ef8f93c9.js:
=> Error: No matching routes for GET /static/js/main.ef8f93c9.js.
=> Warning: Responding with 404 Not Found catcher.
=> Response succeeded.
GET /static/js/main.ef8f93c9.js:
=> Error: No matching routes for GET /static/js/main.ef8f93c9.js.
=> Warning: Responding with 404 Not Found catcher.
=> Response succeeded.
GET /service-worker.js:
=> Error: No matching routes for GET /service-worker.js.
=> Warning: Responding with 404 Not Found catcher.
=> Response succeeded.
and when i input localhost:8000 in broswer it is nothing show me.
it also running warning, i do not think this is my component problem,
Anybody here, there is a little cute here that needs help.
@ruoru
I ran the example on a macOS 10.13 and got no error repeating all your steps. Yet it seems you changed src/main.rs so it is not a problem concerning the example. Could you show your src/main.rs ? Or maybe your problem is more specific to a Rocket routing problem.
no i have nothing changed, i am check to new version code.
/Users/ruoru/Repositories/Rocket/examples/hello_world/src/main.rs
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate rocket;
#[cfg(test)] mod tests;
#[get("/")]
fn hello() -> &'static str {
"Hello, world!"
}
fn main() {
rocket::ignite().mount("/", routes![hello]).launch();
}
Right you didn't change it. Things I don't get is why do you have those HTTP requests :
๏ปฟ* GET /static/js/main.ef8f93c9.js:
And why you didn't even have this HTTP Request : GET / text/html
What you should have when you input localhost:8000
i am not sure what warn of my chrome, i am already clean my cache, chrome also run waring, but it run well in chrome incognito window. and it is run well in my firefox. thank you very much for checking in different broswer.
All right, then it is not a Rocket problem, but a browser one.