Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ark compiles via cargo build but fails to install with ark --install #671

Closed
aaelony opened this issue Jan 21, 2025 · 2 comments
Closed

Comments

@aaelony
Copy link

aaelony commented Jan 21, 2025

The command to install ark fails even though the executable runs after compiling from source using cargo build:

$ ./target/debug/ark
Ark 0.1.159, an R Kernel.

Usage: ark [OPTIONS]

Available options:

--connection_file FILE   Start the kernel with the given JSON connection file
                         (see the Jupyter kernel documentation for details)
-- arg1 arg2 ...         Set the argument list to pass to R; defaults to
                         --interactive
--startup-file FILE      An R file to run on session startup
--session-mode MODE      The mode in which the session is running (console, notebook, background)
--no-capture-streams     Do not capture stdout/stderr from R
--default-repos          Set the default repositories to use, by name:
                         "rstudio" ('cran.rstudio.com', the default), or
                         "posit-ppm" ('packagemanager.posit.co', subject to availability), or
                         "none" (do not alter the 'repos' option in any way)
--repos-conf             Set the default repositories to use from a configuration file
                         containing a list of named repositories (`name = url`)
--version                Print the version of Ark
--log FILE               Log to the given file (if not specified, stdout/stderr
                         will be used)
--install                Install the kernel spec for Ark
--help                   Print this help message

I am on Pop!_OS 22.04 LTS and I ran:

wget https://github.com/posit-dev/ark/archive/refs/tags/0.1.159.tar.gz
mkdir ark
mv 0.1.159.tar.gz ark
cd ark
cargo build

which ran successfully. The BUILDING.md file states next to run ./target/debug/ark --install.

warning: `ark` (lib) generated 20 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 13s
$ RUST_BACKTRACE=1; ./target/debug/ark --install
thread 'main' panicked at crates/ark/src/main.rs:387:36:
called `Result::unwrap()` on an `Err` value: Failed to execute R to determine R_HOME

Caused by:
    Not a directory (os error 20)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

$ echo $R_HOME
/usr/bin/R

The reason why I need to install ark is to use an R kernel interactively in the Zed editor.

The Zed editor allows R to be used interactively. To install this interactive mode for R, the Zed docs state to use ark --install.

Please advise.

@jmcphers
Copy link
Contributor

I think this is the same as #648.

@aaelony
Copy link
Author

aaelony commented Jan 21, 2025

I will close this issue and comment further at #648.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants