Skip to content

Commit c5d62d2

Browse files
committed
docs: update INSTALLATION.md
1 parent a894f62 commit c5d62d2

File tree

1 file changed

+6
-38
lines changed

1 file changed

+6
-38
lines changed

INSTALLATION.md

+6-38
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,23 @@ This document will help you install the `chdb-ruby` ruby gem.
55

66
## Installation
77

8-
### Native Gems
8+
### Compilation During Installation
99

10-
Native (precompiled) gems are available for recent Ruby versions on these platforms:
10+
The gem will automatically compile native extensions during installation (`gem install`). Supported platforms are:
1111

1212
- `aarch64-linux`
1313
- `arm64-darwin`
1414
- `x86_64-linux`
1515
- `x86_64-darwin`
1616

17-
If you are using one of these Ruby versions on one of these platforms, the native gem is the recommended way to install chdb-ruby.
17+
The `chdb-ruby` gem does not provide a pure Ruby implementation. Installation will fail if your platform is unsupported.
1818

19-
`chdb-ruby` gem does not provide a pure Ruby implementation. Installation will fail if your platform is unsupported.
19+
## Runtime Dependencies
2020

21-
## Post-Installation: Setting Up libchdb C++ Library
21+
The `chdb-ruby` gem requires the `libchdb` C++ library as its core engine. The library will be automatically downloaded during installation. The extension uses `dlopen` to dynamically load the library. No manual configuration is required.
2222

23-
After installing the `chdb-ruby` gem, you must also install the `libchdb` C++ library locally. If the library path is not in your system's default search paths, you'll need to configure the runtime library loading path.
24-
25-
### 1. Download the C++ Library
26-
27-
You can either:
28-
- Use the automated installation script:
29-
```bash
30-
curl -sSL https://github.com/chdb-io/chdb-io.github.io/blob/main/install_libchdb.sh | bash
31-
```
32-
33-
- Or manually download from chdb releases(example for arm64-darwin (v3.12)):
34-
```bash
35-
wget https://github.com/chdb-io/chdb/releases/download/v3.12/macos-arm64-libchdb.tar.gz
36-
tar -xzf macos-arm64-libchdb.tar.gz
37-
```
38-
39-
### 2. Configure Library Path
40-
- MacOS:
41-
```bash
42-
export DYLD_LIBRARY_PATH="/path/to/libchdb:$DYLD_LIBRARY_PATH"
43-
```
44-
(Add to your shell config file like ~/.zshrc for persistence)
45-
46-
- Linux:
47-
```bash
48-
export LD_LIBRARY_PATH="/path/to/libchdb:$LD_LIBRARY_PATH"
49-
```
50-
51-
### 3. Verify Installation
23+
## Verify Installation
5224
- Ruby:
5325
```bash
5426
require 'chdb'
5527
```
56-
57-
- Troubleshooting(If you get "Library not loaded" errors):
58-
- Verify the path in DYLD_LIBRARY_PATH/LD_LIBRARY_PATH is correct
59-
- Ensure you downloaded the right version for your platform

0 commit comments

Comments
 (0)