- a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! 🎈
Ruby HTML JavaScript CSS Makefile Dockerfile
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.github Create a config for WelcomeBot #2709 (#2763) Jun 3, 2018
app resolved (#3233) Aug 16, 2018
bin Development script for quick and reliable setup (#2395) Mar 12, 2018
config Emoji encoding 3123 (#3161) Aug 7, 2018
containers Remove duplicate environment variable. (#3000) Jul 6, 2018
db Improve textSearch_profiles result (#3134) Aug 14, 2018
doc Documentation of Draft Feature (#3206) Aug 12, 2018
lib mount sidekiq dashboard (#2772) Jul 3, 2018
public set node image default of basic logo (#3157) Jul 26, 2018
script Mailman server log file path change (#2888) Jun 25, 2018
spec Changing jasmine tests to teaspoon-mocha (#2997) Jul 20, 2018
static styling for plots2 Oct 22, 2012
test Improve peopleLocations endpoint: people_locations method (#3217) Aug 14, 2018
vendor/assets rake tasks nicely failing Apr 4, 2013
.bowerrc fontawesome, js/css assets all loading, working on post form #197 Mar 4, 2015
.codeclimate.yml Add code coverage (#1193) Jan 24, 2017
.dockerignore Create .dockerignore (#2683) May 4, 2018
.eslintignore Add code coverage (#1193) Jan 24, 2017
.eslintrc Add code coverage (#1193) Jan 24, 2017
.gitignore Changing jasmine tests to teaspoon-mocha (#2997) Jul 20, 2018
.gitlab-ci.yml Gitlab move to official docker-in-docker (#3202) Aug 7, 2018
.rubocop.yml Fix a bunch of offenses (#3015) Jul 9, 2018
.rubocop_shopify_styleguide.yml Fix cops (#3085) Jul 19, 2018
.rubocop_todo.yml Fix a bunch of offenses (#3015) Jul 9, 2018
.travis.yml Update .travis.yml Jul 11, 2018 Create (#1681) Oct 12, 2017 Update Feb 15, 2018
Dangerfile Spam comment moderation (#2957) Jul 10, 2018
Dockerfile Debian stretch (fixes #2811) (#2865) Jun 21, 2018
Gemfile re-add skylight gem (#3169) Aug 1, 2018
Gemfile.lock [WIP] (please do not merge yet) Add autocompleting usernames with @ s… Jul 21, 2018
LICENSE adding license file Feb 23, 2015
Makefile Add test task to Makefile (#3197) Aug 5, 2018
README.environment various refinements to install instructions, development sqlite db, c… Mar 29, 2016 Update Aug 1, 2018
Rakefile Changing jasmine tests to teaspoon-mocha (#2997) Jul 20, 2018
bower.json update semver marks on leaflet-environmental-layers and leaflet-blurr… Aug 5, 2018 Rails 5.0 upgrade (#2726) (#2783) Jun 7, 2018 Improved to be the only command used after forki… Jul 30, 2018

Build Status badge Join the chat at Code Climate Coverage Status View performance data on Skylight

The content management system for the Public Lab research community, the plots2 web application is a combination of a group research blog of what we call "research notes" and a wiki. Read more about the data model here.

It features a Bootstrap-based UI and a variety of community and attribution features that help the Public Lab community collaborate on environmental technology design and documentation, as well as community organizing. Originally a Drupal site, it was rewritten in 2012 in Ruby on Rails and has since extended but not entirely replaced the legacy Drupal data model and database design.

Some key features include:


(Above: draft of our Data model)


We welcome contributions, and are especially interested in welcoming first time contributors. Read more about how to contribute below! We especially welcome contributions from people from groups under-represented in free and open source software!

Code of Conduct

Please read and abide by our Code of Conduct; our community aspires to be a respectful place both during online and in-­person interactions.

Table of Contents

  1. Simple Installation with Cloud9
  2. Prerequisites
  3. Testing
  4. API
  5. Bugs and Support
  6. Data model
  7. Recaptcha


  1. Fork our repo from
  2. In the console, download a copy of your forked repo with git clone where your_username is your GitHub username.
  3. Enter the new plots2 directory with cd plots2.
  4. Install gems with bundle install --without production mysql from the rails root folder, to install the gems you'll need, excluding those needed only in production. You may need to first run bundle update if you have older gems in your environment from previous Rails work.
  5. Make a copy of db/schema.rb.example and place it at db/schema.rb.
  6. Make a copy of config/database.yml.sqlite.example and place it at config/database.yml
  7. Run rake db:setup to set up the database
  8. Install static assets (like external javascript libraries, fonts) with bower install
  9. By default, start rails with passenger start from the Rails root and open http://localhost:3000 in a web browser. (for local SSL work, see SSL below)
  10. Wheeeee! You're up and running! Log in with test usernames "user", "moderator", or "admin", and password "password".
  11. Run rails test -d to confirm that your install is working properly.

SSL in Development

We at public labs use openssl gem to provide SSL for the secure connection in the development mode. You can run the https connection on the localhost by following following steps:

  1. Use 'passenger start --ssl --ssl-certificate config/localhost.crt --ssl-certificate-key config/localhost.key --ssl-port 3001'.
  2. Open up https://localhost:3001.
  3. Add security exceptions from the advance settings of the browser. You can also use http (unsecure connection) on the port number 3000 by going to 'http://localhost:3000'. We use port number 3001 for 'https' and port number 3000 for 'http' connection. Secure connection is needed for OAuth authentication etc.

How to start and modify cron jobs

  1. We are using whenever gem to schedule cron jobs Whenever
  2. All the cron jobs are written in easy ruby syntax using this gem and can be found in config/schedule.rb.
  3. Go to the config/schedule.rb file to create and modify the cron jobs.
  4. Click here to know about how to write cron jobs.
  5. After updating config/schedule.rb file run the command whenever --update-crontab to update the cron jobs.
  6. To see the installed list of cron jobs use command crontab -l
  7. For more details about this gem, visit the official repository of whenever gem.

Bundle exec

For some, it will be necessary to prepend your gem-related commands with bundle exec, for example, bundle exec passenger start; adding bundle exec ensures you're using the version of passenger you just installed with Bundler. bundle exec rake db: setup, bundle exec rake db: seed are other examples of where this might be necessary.


Public Lab now supports reply by email to comment feature. For more details regarding it go to the email documentation

Bugs and support

To report bugs and request features, please use the GitHub issue tracker provided at

For additional support, join the Public Lab website and mailing list at or for urgent requests, email

Internationalization now supports Internationalization and localization, though we are in the initial stages. This has been accomplished with rails-I8n.

To see it in action, click on the 'Language' drop-down located in the footer section of the page. All the guidelines and best practices for I18n can be found here.

Translations are arranged in the YAML files here, which are set in a similar way to views files. An example for adding translations can be found here.

To add new languages or for additional support, please write to


To report security vulnerabilities or for questions about security, please contact Our Web Working Group will assess and respond promptly.


Help improve Public Lab software!

First Time?

New to open source/free software? Here is a selection of issues we've made especially for first-timers. We're here to help, so just ask if one looks interesting :

We also have a slightly larger list of easy-ish but small and self-contained issues: