Installation
Purpose
This guide covers installing Excavate on your system. Excavate is a 100% pure Ruby gem with no native dependencies, making installation straightforward on any platform that supports Ruby.
Concepts
Excavate is distributed as a Ruby gem through RubyGems.org. It requires Ruby 2.7 or later and has no compiled dependencies, ensuring compatibility across all platforms including Linux, macOS, Windows, and BSD.
Pure Ruby Benefits
Excavate is a 100% pure Ruby gem with no native extensions:
-
No compilation required: Works immediately after installation
-
Cross-platform: Same gem works on Linux, macOS, Windows, BSD
-
Multiple Ruby implementations: MRI, JRuby, TruffleRuby
-
No system dependencies: No need for libarchive, 7-zip, or other tools
-
Easy deployment: No build tools needed in production
Requirements
Ruby Version
Excavate requires Ruby 2.7 or later. Check your Ruby version:
ruby --versionIf you need to install or update Ruby, see the official Ruby installation guide.
Installation Methods
Method 1: Installing from RubyGems (Recommended)
Install the latest stable version:
gem install excavateThis installs both the library and the excavate command-line tool.
Verifying Installation
After installation, verify Excavate is available:
excavate --versionYou should see output like:
excavate version 1.0.0Test basic functionality:
excavate --helpThis displays the available commands.
Quick Test
Create a test archive and extract it:
require 'excavate'
# Create a simple test
File.write('test.txt', 'Hello, Excavate!')
system('zip test.zip test.txt')
# Extract using Excavate
archive = Excavate::Archive.new('test.zip')
archive.extract('output')
puts "Extracted to: #{archive.extract('output')}"Troubleshooting
Command Not Found
If excavate is not found after installation:
-
Ensure the gem binaries directory is in your PATH:
gem environmentLook for the "EXECUTABLE DIRECTORY" path.
-
Add it to your PATH if needed (typically
~/.gem/ruby/X.X.X/bin):export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
Next steps
Now that Excavate is installed:
-
Continue to Quick Start Guide to extract your first archive
-
Learn basic usage patterns
-
Explore comprehensive guides for different formats