Skip to content

Local Development Setup

hadcomfort edited this page Jun 12, 2025 · 1 revision

Local Development Setup

Running the Veterans Information Resource website on your local machine is the best way to test your changes before submitting a contribution. This guide will walk you through the process.

Prerequisites

Before you begin, ensure you have the following software installed on your system:

  • Git: For cloning the repository. Download Git.
  • Ruby: The programming language Jekyll is built on. It is highly recommended to use a version manager like rbenv or RVM. You can also download Ruby here.
  • Bundler: The package manager for Ruby. You can install it by running: gem install bundler.

Installation and Setup

  1. Clone the Repository: Open your terminal and clone the project from GitHub.

    git clone https://github.com/hadcomfort/hadcomfort.github.io.git
  2. Navigate to the Directory:

    cd hadcomfort.github.io
  3. Install Dependencies: Bundler will read the Gemfile and install all the necessary gems (like Jekyll).

    bundle install

Running the Local Server

  1. Start the Jekyll Server: Use Bundler to execute Jekyll in a way that respects the versions in the Gemfile.lock.

    bundle exec jekyll serve

    This command builds the site and starts a local web server. You should see output similar to this:

    Configuration file: /path/to/hadcomfort.github.io/_config.yml
                Source: /path/to/hadcomfort.github.io
           Destination: /path/to/hadcomfort.github.io/_site
     Incremental build: disabled. Enable with --incremental
          Generating...
                        done in 0.529 seconds.
     Auto-regeneration: enabled for '/path/to/hadcomfort.github.io'
        Server address: http://127.0.0.1:4000/
      Server running... press ctrl-c to stop.
    
  2. View the Site: Open your web browser and navigate to http://localhost:4000. You should see a local version of the website.

Troubleshooting

  • Dependency Errors: If bundle install fails, ensure your Ruby version is compatible. Sometimes running bundle update can resolve dependency conflicts.
  • Jekyll Build Errors: Pay close attention to the terminal output when you run bundle exec jekyll serve. It will often tell you exactly which file and line has a syntax error.

Clone this wiki locally