Skip to content

Could Not Successfully Spawn Process #4

@JimLynchCodes

Description

@JimLynchCodes

When I create a new project, run cargo add ispell, and and the example code it doesn't work for me...

extern crate ispell;
use ispell::SpellLauncher;

fn main() {
    let mut checker = SpellLauncher::new()
        .aspell()
        .dictionary("en_GB")
        .launch()
        .unwrap();
    let errors = checker.check("A simpel test to see if it detetcs typing errors").unwrap();
    for e in errors {
        println!("'{}' (pos: {}) is misspelled!", &e.misspelled, e.position);
        if !e.suggestions.is_empty() {
            println!("Maybe you meant '{}'?", &e.suggestions[0]);
        }
    }
}

The docs say this should print:

'simpel' (pos: 2) is misspelled!
Maybe you meant 'simple'?
'detetcs' (pos: 27) is misspelled!
Maybe you meant 'dietetics'?

But instead I see this:

   Compiling ispell v0.3.1
   Compiling derf v0.1.0 (/Users/jim/trash/not-spell/derf)
    Finished dev [unoptimized + debuginfo] target(s) in 0.66s
     Running `target/debug/derf`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { msg: "could not successfully spawn process 'aspell': No such file or directory (os error 2)", variant: Process }', src/main.rs:9:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Strange, right? Is this a regression in the library? Am I just doing something wrong here?

rustc --version
rustc 1.68.0 (2c8cc3432 2023-03-06)

cargo --version
cargo 1.68.0 (115f34552 2023-02-26)

mac os v12.4 (21F79)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions