Skip to content

TesfahunTaddege/website

 
 

Repository files navigation

ODK Website

Platform Ruby version License Build status Slack status

This repository is home to the ODK homepage.

Table of Contents

Installing requirements

The ODK website is built with Ruby and below are the installation steps we recommend for getting a Ruby environment that will work best with the ODK website.

MacOS, Linux

  1. Installing rbenv

    MacOS: Installation instructions using Homebrew can be found in the rbenv documentation. This is the preferred method for MacOS. To install rbenv without Homebrew, refer to the Linux instructions.

    Linux: The rbenv-installer is a script which idempotently installs or updates rbenv on your system.

  2. Installing Ruby

    Once rbenv has been installed, install the latest Ruby (currently 2.5.1):

    rbenv install 2.5.1
    

Windows

  1. Windows users should use RubyInstaller.

Running the website

  1. Follow the instructions in the contribution guide to fork the website repository and then clone your fork.

  2. Configure your project to use the correct version of Ruby.

    a. Navigate to the root directory of your project. If you use Windows, replace the cd command with dir.

    cd /MY/DEVELOPMENT/DIRECTORY/website
    

    b. Set the local application-specific Ruby version by using rbenv-local.

    rbenv local 2.5.1
    

    c. Verify that your project is using Ruby version 2.5.1:

    ruby -v
    
  3. Install bundler.

gem install bundler
  1. Install this project.
bundle install
  1. Launch the server. The site will update as changes are made.
bundle exec jekyll serve

Contributing

One quick way to contribute is to review the website and file issues documenting the problems you see. If you would like to help fix those issues, see the contribution guide.

Troubleshooting

Permissions

If you encounter the following error: You don't have write permissions for the /var/lib/gems/2.3.0 directory. then please review the installation instructions to make use of rbenv.

Only root has write permissions for /var/lib; using sudo for subsequent gem install comands won't work, and changing permissions for that directory using chmod is considered dangerous. This issue is avoided when using rbenv.

Nokogiri

Nokogiri (鋸) is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support.

The installation command bundle install tries to install nokogiri.

If you face following error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

You can fix it as follows:

For Ubuntu/Debian OS: Run the command sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev and try again.

If you are using any other OS, you can follow the instructions mentioned here: http://www.nokogiri.org/tutorials/installing_nokogiri.html

Packages

No packages published

Languages

  • HTML 62.4%
  • CSS 25.5%
  • Ruby 12.1%