Ruby Installation
Step 1: Download RubyInstaller
- Go to rubyinstaller.org
- Download Ruby+Devkit 3.4.6-1 (x64) (or latest stable 3.4.x version)
- Run the installer
Step 2: Install Ruby
- During installation, check these options:
- Add Ruby executables to your PATH
- Associate .rb and .rbw files with this Ruby installation
- Install to the default location:
C:\Ruby34-x64 - After installation completes, leave the "Run 'ridk install'" checkbox checked
- Click Finish
Step 3: Install MSYS2 and Development Tools
- A command window will open for MSYS2 installation
- Enter
1and press Enter to install MSYS2 base - Enter
2and press Enter to install MSYS2 toolchain - Enter
3and press Enter to install MSYS2 and MINGW development toolchain - When complete, press Enter to close the window
Step 4: Verify Ruby Installation
Open a new PowerShell window:
ruby --version
gem --version
You should see Ruby 3.4.x and gem version numbers.
Step 5: Install Bundler
gem install bundler -v 2.6.9
Database Installation (MariaDB)
Step 1: Download MariaDB
- Go to mariadb.org
- Select:
- Product: MariaDB Server
- Version: 10.5.4 (or latest 10.5.x)
- OS: Windows
- Architecture: x64
- Download the MSI installer
Step 2: Install MariaDB
- Run the MSI installer
- Click Next through the welcome screen
- Accept the license agreement and click Next
- Choose Custom installation
- Set installation path to:
C:\MariaDB - Click Next → Install
- During installation, you'll be prompted for configuration:
- Root password: Enter a strong password (write it down!)
- Data directory: Accept default
C:\Program Files\MariaDB 10.5\data - Port: Accept default 3306
- Service name: Accept default MariaDB
- Run as service: Check this box
- Complete the installation
Step 3: Verify MariaDB Installation
Open Command Prompt as Administrator:
mysql --version
You should see MariaDB version information.
Step 4: Test Database Connection
mysql -u root -p
Enter your root password. You should see the MariaDB prompt:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.5.4-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
Type exit; to leave the MariaDB prompt.
Step 5: Create Database User
mysql -u root -p
At the MariaDB prompt, run:
CREATE USER 'otwarchive'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON *.* TO 'otwarchive'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Redis Installation
Redis does not have an official Windows port, but we have two options:
Option A: Use Memurai (Recommended for Windows)
Memurai is a Redis-compatible server for Windows.
- Download Memurai from memurai.com
- Run the installer
- Accept default installation location:
C:\Program Files\Memurai - Complete the installation
- Memurai will automatically start as a Windows service
Verify Memurai installation:
redis-cli ping
You should see: PONG
Elasticsearch Installation
Step 1: Download Elasticsearch
- Go to elastic.co
- Download Elasticsearch 7.17.9 (Windows ZIP archive)
- Important: Use version 7.17.x, not 8.x (gem compatibility)
- Extract the ZIP to:
C:\Elasticsearch
Step 2: Configure Elasticsearch
- Navigate to:
C:\Elasticsearch\config - Open
elasticsearch.ymlin a text editor - Add or modify these settings:
cluster.name: skaia-library
node.name: node-1
network.host: 127.0.0.1
http.port: 9200
discovery.type: single-node
# Disable security features for simplicity
xpack.security.enabled: false
- Save the file
Step 3: Configure JVM Memory
- Navigate to:
C:\Elasticsearch\config - Open
jvm.optionsin a text editor - Find and modify these lines (adjust based on your RAM):
-Xms1g
-Xmx1g
For 16GB RAM, you can use 2GB:
-Xms2g
-Xmx2g
- Save the file
Step 4: Set JAVA_HOME
Elasticsearch requires Java 11 or later.
- Download and install Amazon Corretto 11 or Adoptium Temurin 11
- Run the installer with default settings
- Set JAVA_HOME environment variable:
- Press
Win + R, typesysdm.cpl, press Enter - Click Advanced → Environment Variables
- Under System variables, click New
- Variable name:
JAVA_HOME - Variable value:
C:\Program Files\Eclipse Adoptium\jdk-11.x.x-hotspot(adjust to your installation path) - Click OK
- Find Path variable, click Edit
- Add:
%JAVA_HOME%\bin - Click OK on all dialogs
- Press
Step 5: Start Elasticsearch
Open Command Prompt as Administrator:
cd C:\Elasticsearch\bin
elasticsearch.bat
Elasticsearch will start and you'll see log output. Leave this window open for now.
Verify Elasticsearch is running: Open a new PowerShell window:
curl http://localhost:9200
You should see JSON output with cluster information.
Step 6: Install Elasticsearch as Windows Service (Optional)
To run Elasticsearch as a Windows service, you'll need to use a service wrapper like NSSM (Non-Sucking Service Manager):
- Download NSSM from nssm.cc
- Extract to:
C:\nssm - Open Command Prompt as Administrator:
cd C:\nssm nssm install Elasticsearch C:\Elasticsearch\bin\elasticsearch.bat nssm start Elasticsearch
Memcached Installation
Step 1: Download Memcached
- Download memcached from releases.replicated.com or use a Windows port
- Extract to:
C:\memcached
Option A: Use the Windows Port
- Download from allegro.com or search for "memcached windows"
- Extract to:
C:\memcached - Open Command Prompt as Administrator:
cd C:\memcached memcached.exe -d install memcached.exe -d start
Option B: Use Docker (Hybrid Approach)
If you want to use Docker just for Memcached:
docker run -d -p 11211:11211 memcached:1.5
For this guide, we'll assume Option A (native Windows).
Verify Memcached is running:
telnet localhost 11211
If connected, type stats and press Enter. You should see statistics. Press Ctrl+] then quit to exit.
Node.js Installation
Rails uses Node.js for JavaScript asset compilation.
Step 1: Download Node.js
- Go to nodejs.org
- Download the LTS version (Long Term Support)
- Run the installer
Step 2: Install Node.js
- Accept all default options
- Complete the installation
Verify Node.js installation:
node --version
npm --version