This is the source code for the Awesome Foundation website
Ruby CSS HTML Gherkin JavaScript CoffeeScript Other
Latest commit 9de4850 Aug 4, 2017 @jcn jcn committed on GitHub Merge pull request #277 from awesomefoundation/rails-3-2-22-5
Bump Rails to
Failed to load latest commit information.
app Project submissions don't include RSS any more, so remove it from the… Jul 10, 2017
config Revert "Update countries.rb" Aug 5, 2017
db Change customized email field name, use simple_form better, add tests Jul 10, 2017
doc redoing docker-compose up gif Oct 10, 2015
features bump gem versions and update FG syntax style Mar 27, 2012
lib remove trailing whitespace Jun 5, 2012
log Initial commit - suspended project Jan 23, 2012
public Remove blog link from header Nov 24, 2014
script Initial commit - suspended project Jan 23, 2012
spec Change customized email field name, use simple_form better, add tests Jul 10, 2017
vendor/assets/stylesheets Switch lightbox from colorbox to magnific popup Feb 11, 2015
.gitignore Add the use of .env file for configuration in development environment Oct 16, 2014
.rspec Properly load Turnip to run features Jul 7, 2017
.ruby-version Bump .ruby-version file to 2.1.7 Nov 16, 2015
.travis.yml undoing unnecessary travis sudo change Oct 11, 2015
COPYING Add licensing information and link to AwesomeBits Github repo to the FAQ Aug 31, 2012
Dockerfile Remove therubyracer gem and add the nodejs runtime to the web container Nov 16, 2015
Gemfile Bump Rails to Aug 5, 2017
Gemfile.lock Bump Rails to Aug 5, 2017
Procfile Switch from unicorn to passenger in production Oct 27, 2014 Update copyright year in README Apr 27, 2017
Rakefile Address feedback Nov 1, 2015 Initial commit - suspended project Jan 23, 2012
docker-compose.yml adding newlines at EOF Oct 10, 2015 adding newlines at EOF Oct 10, 2015

Build Status




To start developing this project quickly, feel free to use the docker-compose workflow. This will install a local Postgres database in a Docker container, and the Rails app in another container.

Installing the Docker runtime

Linux: Install the Native Docker Engine

If you're developing on a Linux system, follow these instructions to install Docker natively on your system. You will also need to install Docker Compose.

Mac or Windows: Install Docker Machine

If you're developing from a Mac or Windows machine, you will need to use Docker Machine to run the Docker engine in a Linux VM and proxy commands to it. You can install Docker Machine via the Docker Toolbox. The Docker toolbox will also install Docker Compose.

Once you have Docker Machine installed, you'll need to create a new machine for this project. Assuming you have Virtualbox installed, you'd run the following:

docker-machine create -d virtualbox awesomebits
eval $(docker-machine env awesomebits)

Starting the app with Docker Compose

Once you have the Docker engine and Docker Compose installed, you should be able to launch the app with the following command:

docker-compose up

If successful, your terminal should look something like this:

Docker Compose Up Success

Executing arbitary commands with Docker Compose

You can also run arbitrary commands within the Docker container. For example, to run rails console, do the following:

docker-compose run web rails console

Running Rails Console with Docker Compose

Environment Variables

In order to set environment variables (for example, to enable S3 in your development environment), create a file called .env in the main project directory. This file will look like this:



Constant COUNTRY_PRIORITY used to define an array of priority countries. This used in the Chapter Form to create quick access to popular countries; also used in CountrySorter model for sorting the chapters.

Constant can be found in initializers file. /config/initializers/countries.rb


Much of the AwesomeBits interface has been localized. Localization files are stored in two places, depending on the type of content being localized:

  • Discrete srings and localizations are stored in config/locales/ directory with a separate file for each language
  • Partials with localized content are stored in the app/views/locales/ directory with the locale in the names of the file (i.e.


Images are resized dynamically via the Magickly gem. In order to display images properly, you must have a Magickly installation running and you must set the MAGICKLY_HOST environment variable to point to that host.

e.g. If you are running Magickly localy on port 8888, add the following line to your .env file:



Very basic blacklisting is implemented using Rack::Attack. To blacklist an IP, simply add the IP address to the BLACKLIST_IPS environment variable. Multiple IPs should be comma separated:



AwesomeBits is Copyright 2012-2017, Institute on Higher Awesome Studies

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see