Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apache/arrow/llms.txt
Use this file to discover all available pages before exploring further.
Installation and Setup
This guide covers how to install and configure Red Arrow in your Ruby environment.
Prerequisites
Red Arrow requires the Apache Arrow GLib library to be installed on your system. The installation process varies by platform.
System Requirements
- Ruby 2.7 or later (or JRuby)
- Apache Arrow GLib (C library)
- GObject Introspection library
Quick Installation
Using Bundler (Recommended)
The easiest way to install Red Arrow is using Bundler with the rubygems-requirements-system plugin, which automatically handles system dependencies.
Add to your Gemfile:
plugin "rubygems-requirements-system"
gem "red-arrow"
Then run:
The plugin will automatically:
- Detect your operating system
- Install Apache Arrow GLib if needed
- Install Red Arrow gem
Using RubyGems
Install directly with gem:
gem install rubygems-requirements-system red-arrow
macOS with Homebrew
Install Apache Arrow using Homebrew:
# Install Apache Arrow C++
brew install apache-arrow
# Install Apache Arrow GLib
brew install apache-arrow-glib
# Install Red Arrow
gem install red-arrow
For development with the latest version:
brew install apache-arrow --head
brew install apache-arrow-glib --head
Ubuntu/Debian
Add Apache Arrow APT repository and install:
# Add Apache Arrow repository
sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
# Install Arrow GLib
sudo apt install -y -V libarrow-glib-dev
# Install Red Arrow
gem install red-arrow
CentOS/RHEL/AlmaLinux
Add Apache Arrow YUM repository:
# For CentOS/RHEL 9
sudo dnf install -y epel-release
sudo dnf install -y https://apache.jfrog.io/artifactory/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)/apache-arrow-release-latest.rpm
sudo dnf install -y arrow-glib-devel
# Install Red Arrow
gem install red-arrow
Amazon Linux
sudo yum install -y https://apache.jfrog.io/artifactory/arrow/amazon-linux/$(cut -d: -f6 /etc/system-release-cpe)/apache-arrow-release-latest.rpm
sudo yum install -y arrow-glib-devel
gem install red-arrow
Fedora
sudo dnf install -y libarrow-glib-devel
gem install red-arrow
Conda
If you’re using Conda:
conda install -c conda-forge arrow-c-glib
gem install red-arrow
Windows (MSYS2)
pacman -S mingw-w64-x86_64-arrow
gem install red-arrow
JRuby Installation
For JRuby, Arrow Java libraries are automatically managed:
# Gemfile
gem "red-arrow", platform: :jruby
The required Java dependencies (arrow-vector and arrow-memory-netty) are specified in the gemspec and will be resolved automatically.
Additional Packages
Install additional Red Arrow packages for extended functionality:
Parquet Support
require 'parquet'
table = Arrow::Table.load('data.parquet', format: :parquet)
Dataset API (S3, Multiple Files)
gem install red-arrow-dataset
require 'arrow-dataset'
# Read from S3
table = Arrow::Table.load(URI('s3://bucket/data.parquet'))
# Read from folder
table = Arrow::Table.load(URI('file:///path/to/folder/'), format: :parquet)
CUDA/GPU Support
gem install red-arrow-cuda
Flight RPC
gem install red-arrow-flight
Gandiva (Expression Compiler)
Verification
Verify your installation:
require 'arrow'
# Check version
puts Arrow::Version::MAJOR
puts Arrow::Version::MINOR
puts Arrow::Version::MICRO
# Create a simple table
table = Arrow::Table.new('x' => [1, 2, 3])
puts table.to_s
You should see output like:
Development Setup
For development work on Red Arrow itself:
# Clone repository
git clone https://github.com/apache/arrow.git
cd arrow/ruby/red-arrow
# Install dependencies
bundle install
# Run tests
bundle exec rake test
Building from Source
To build Apache Arrow C++ and GLib from source, refer to:
Troubleshooting
Missing System Libraries
If you see errors about missing libraries:
Gobject-introspection typelib file for arrow-glib not found
Ensure Apache Arrow GLib is properly installed and PKG_CONFIG_PATH includes Arrow’s .pc files:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
Version Mismatch
Red Arrow requires matching versions with Arrow GLib. If you encounter version errors, ensure:
# Check installed Arrow GLib version
pkg-config --modversion arrow-glib
# Should match Red Arrow gem version (major.minor.micro)
macOS Library Paths
On macOS, you may need to set library paths:
export PKG_CONFIG_PATH="$(brew --prefix)/lib/pkgconfig"
export DYLD_LIBRARY_PATH="$(brew --prefix)/lib:$DYLD_LIBRARY_PATH"
Next Steps
Now that Red Arrow is installed, learn how to use it: