|
2 | 2 |
|
3 | 3 | This repository hosts the sources for [www.learningu.org](https://www.learningu.org). We use Jekyll to generate a static site. |
4 | 4 |
|
5 | | -## Development |
6 | | - |
7 | | -Clone this repository, and run `make serve`. Then go to [localhost:4000](http://localhost:4000) in your browser to see your development server. |
8 | 5 |
|
9 | 6 | ## Production setup |
10 | 7 |
|
11 | 8 | The production site is hosted via Github Pages. To make changes, just push to Github; you may need to wait up to 10 minutes for caches to expire. |
12 | 9 |
|
13 | 10 | In order to serve SSL on the custom domain, we proxy through CloudFront. CloudFront redirects HTTP requests to HTTPS, and proxies HTTPS requests through to `learning-unlimited.github.io`. For the apex domain `learningu.org`, we have an S3 bucket serving a redirect to `https://www.learningu.org`, which is also proxied by a separate CloudFront distribution. We use similar redirects for `groups.learningu.org` and `websupport.learningu.org`. All of these use an HTTP certificate generated through AWS Certificate Manager. Ask @benjaminjkraft or @btidor if you need access to any of the AWS resources. |
| 11 | + |
| 12 | +# Local Development Setup Guide |
| 13 | + |
| 14 | +This guide provides step-by-step instructions to set up the **Learning Unlimited** website locally on an Ubuntu/WSL environment. We utilize `rbenv` to manage Ruby versions and `Bundler` to handle project dependencies without requiring system-level `sudo` permissions. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +* Ubuntu / Debian (WSL) |
| 19 | +* Git |
| 20 | + |
| 21 | +## Step 1: Install System Dependencies |
| 22 | + |
| 23 | +Open your Ubuntu/WSL terminal and install the necessary libraries to compile Ruby from source: |
| 24 | + |
| 25 | +```bash |
| 26 | +sudo apt update |
| 27 | +sudo apt install -y build-essential curl git libssl-dev libreadline-dev zlib1g-dev libffi-dev libyaml-dev autoconf bison libncurses-dev libgdbm-dev |
| 28 | +``` |
| 29 | + |
| 30 | +## Step 2: Install rbenv and Ruby |
| 31 | + |
| 32 | +Using a version manager like `rbenv` ensures your local environment remains isolated and clean. |
| 33 | + |
| 34 | +Install `rbenv`: |
| 35 | + |
| 36 | +```bash |
| 37 | +curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash |
| 38 | +``` |
| 39 | + |
| 40 | +### Configure your shell |
| 41 | + |
| 42 | +Add `rbenv` to your `PATH` and enable auto-initialization: |
| 43 | + |
| 44 | +```bash |
| 45 | +echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc |
| 46 | +echo 'eval "$(rbenv init -)"' >> ~/.bashrc |
| 47 | +source ~/.bashrc |
| 48 | +``` |
| 49 | + |
| 50 | +### Install Ruby 3.2.2 |
| 51 | + |
| 52 | +```bash |
| 53 | +rbenv install 3.2.2 |
| 54 | +rbenv global 3.2.2 |
| 55 | +``` |
| 56 | + |
| 57 | +## Step 3: Clone the Project |
| 58 | + |
| 59 | +Fork the project on GitHub, then clone your fork locally: |
| 60 | + |
| 61 | +```bash |
| 62 | +git clone https://github.com/Your-UserName/learning-unlimited-about-us.git |
| 63 | +cd learning-unlimited-about-us |
| 64 | +``` |
| 65 | + |
| 66 | +## Step 4: Build and Serve |
| 67 | + |
| 68 | +Install Bundler and the project dependencies specified in the `Gemfile`: |
| 69 | + |
| 70 | +```bash |
| 71 | +gem install bundler |
| 72 | +bundle install |
| 73 | +``` |
| 74 | + |
| 75 | +Start the local development server: |
| 76 | + |
| 77 | +```bash |
| 78 | +bundle exec make serve |
| 79 | +``` |
| 80 | + |
| 81 | +Once the build is complete, open your browser and navigate to `http:// |
0 commit comments