+ Help others take their first step
+ Now that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step. 🙌
+ https://code.publiclab.org
+ Try looking at this list of `first-timers-only` issues, and see if someone else is waiting for feedback, or even stuck! 😕
+ People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! 😄 🎉
+ Read about how to help support another newcomer here, or find other ways to offer mutual support here.
+
# It is recommended to include as many gifs and emojis as possible
diff --git a/.github/first-timers-issue-template.md b/.github/first-timers-issue-template.md
index 950f0cc38..f013fbcfa 100644
--- a/.github/first-timers-issue-template.md
+++ b/.github/first-timers-issue-template.md
@@ -1,10 +1,10 @@
-Hi, this is a [first-timers-only issue](https://code.publiclab.org#r=all). This means we've worked to make it more legible to folks who either **haven't contributed to our codebase before, or even folks who haven't contributed to open source before**.
+Hi, this is a [first-timers-only issue](https://code.publiclab.org/#r=all). This means we've worked to make it more legible to folks who either **haven't contributed to our codebase before, or even folks who haven't contributed to open source before**.
If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝
-If you have contributed before, **consider leaving this one for someone new**, and looking through our general [help wanted](https://github.com/publiclab/mapknitter/labels/help-wanted) issues. Thanks!
+If you have contributed before, **consider leaving this one for someone new**, and looking through our general [help wanted](https://github.com/publiclab/plots2/labels/help-wanted) issues. Thanks!
### 🤔 What you will need to know.
@@ -16,6 +16,8 @@ Nothing. This issue is meant to welcome you to Open Source :) We are happy to wa
- [ ] 📝 **Update** the file [$FILENAME]($BRANCH_URL) in the `$REPO` repository (press the little pen Icon) and edit the line as shown below.
+To get help installing the application on your computer, see [the project README](https://github.com/publiclab/mapknitter/tree/main/README.md) and get help at #307
+
[See this page](https://code.publiclab.org/#r=all) for some help in taking your first steps!
Below is a "diff" showing in red (and a `-`) which lines to remove, and in green (and a `+`) which lines to add:
@@ -42,6 +44,6 @@ Leave a comment below!
### Is someone else already working on this?
-We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. **If someone seem stuck, offer them some help!** Otherwise, [take a look at some other issues you can help with](https://publiclab.github.io/community-toolbox/#r=all). Thanks!
+We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. **If someone seem stuck, offer them some help!** Otherwise, [take a look at some other issues you can help with](https://code.publiclab.org/#r=all). Thanks!
(This issue was created by [First-Timers-Bot](https://github.com/hoodiehq/first-timers-bot).)
diff --git a/.github/first-timers.yml b/.github/first-timers.yml
new file mode 100644
index 000000000..78367ef38
--- /dev/null
+++ b/.github/first-timers.yml
@@ -0,0 +1,12 @@
+# You can change the labels to suit your needs if "first-timers-only" is not what you are looking for.
+# These are some examples.
+labels:
+ - first-timers-only
+ - help wanted
+
+#If you would like to add your own template for the issue, add an .md file to your .github folder
+template: .github/first-timers-issue-template.md
+
+# You can create the issue in a different repo than where the problem is. Just make sure you installed the bot on the configured repository.
+# The issue will link back to the original repository where the contribution will be made.
+#repository: repo-name
diff --git a/.travis.yml b/.travis.yml
index 8444c0721..dacd3f3d0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,11 +6,10 @@ install:
- cp config/database.yml.example config/database.yml
- cp config/config.yml.example config/config.yml
- cp db/schema.rb.example db/schema.rb
- - docker-compose build
- - docker-compose run web sleep 10
- - docker-compose run web bash -c "rake db:setup"
- - docker-compose run web bash -c "rake db:migrate"
- - docker-compose run web bower install --allow-root
+ - docker-compose up -d --build
+ - docker-compose exec web bash -l -c "sleep 10"
+ - docker-compose exec web bash -l -c "bundle install"
+ - docker-compose exec web bash -l -c "rake db:setup || rake db:migrate"
script:
- - docker-compose run web bash -c "rake test"
+ - docker-compose exec web bash -l -c "rake test"
diff --git a/Dockerfile b/Dockerfile
index 6f1a4153d..5fbfd32b1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,27 +1,46 @@
# Dockerfile # Mapknitter
# https://github.com/publiclab/mapknitter/
+# This image deploys Mapknitter!
-FROM ruby:2.4.4-stretch
-MAINTAINER Sebastian Silva "sebastian@fuentelibre.org"
-
-LABEL This image deploys Mapknitter!
+FROM debian:buster
# Set correct environment variables.
-RUN mkdir -p /app
ENV HOME /root
# Install dependencies
-RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
-RUN apt-get update -qq && apt-get install -y bundler default-libmysqlclient-dev ruby-rmagick libfreeimage3 libfreeimage-dev ruby-dev gdal-bin python-gdal curl libcurl4-openssl-dev libssl-dev zip nodejs ##ALSO TRIED: ruby-pg
+RUN apt-get update -qq && apt-get install -y \
+ bundler ruby-rmagick libfreeimage3 \
+ libfreeimage-dev zip nodejs gdal-bin \
+ curl g++ gcc autoconf automake bison \
+ libc6-dev libffi-dev libgdbm-dev \
+ libncurses5-dev libsqlite3-dev libtool \
+ libyaml-dev make pkg-config sqlite3 \
+ zlib1g-dev libgmp-dev libreadline-dev libssl-dev \
+ procps libmariadb-dev-compat libmariadb-dev git python-gdal \
+ imagemagick
+
+# Ruby
+RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && curl -sSL https://get.rvm.io | bash -s stable && usermod -a -G rvm root
+RUN /bin/bash -l -c ". /etc/profile.d/rvm.sh && rvm install 2.4.4 && rvm use 2.4.4 --default"
+
+RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && apt-get install -y npm
RUN npm install -g bower
+
# Install bundle of gems
+SHELL [ "/bin/bash", "-l", "-c" ]
WORKDIR /tmp
ADD Gemfile /tmp/Gemfile
ADD Gemfile.lock /tmp/Gemfile.lock
RUN bundle install
+# HOTFIX Workaround for mysql2 gem incompatibility with libmariadb-dev
+RUN sed -i "s/ LONG_PASSWORD |//g" /usr/local/rvm/gems/ruby-*/gems/mysql2-*/lib/mysql2/client.rb
+
# Add the Rails app
WORKDIR /app
-ADD . /app
-RUN bower install --allow-root
+COPY Gemfile /app/Gemfile
+COPY Gemfile.lock /app/Gemfile.lock
+COPY start.sh /app/start.sh
+
+CMD [ "bash", "-l", "start.sh" ]
diff --git a/Gemfile b/Gemfile
index 9c5d82a88..5d7695a30 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,13 +4,13 @@ ruby "2.4.4"
gem "rails", "~>3.2"
gem 'rake', '~> 12.3.2'
-gem "will_paginate", "3.1.6"
+gem "will_paginate", "3.1.7"
gem "will_paginate-bootstrap"
gem "friendly_id"
# dependencies
group :dependencies do
- gem 'mysql2', '~> 0.3.20'
+ gem 'mysql2', '< 0.4'
gem "geokit-rails", "1.1.4"
gem "image_science", "1.2.6"
gem "recaptcha", :require => "recaptcha/rails"
@@ -31,7 +31,7 @@ group :dependencies do
# asset pipelining
gem "sprockets"#, "2.12.1"
- gem "sass"
+ gem "sass", :require => 'sass'
gem "autoprefixer-rails"
gem "uglifier"
diff --git a/Gemfile.lock b/Gemfile.lock
index 8c16dde90..e41685fa7 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -32,7 +32,7 @@ GEM
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.3)
- autoprefixer-rails (9.4.7)
+ autoprefixer-rails (9.4.8)
execjs
aws-sdk (1.5.8)
httparty (~> 0.7)
@@ -159,8 +159,8 @@ GEM
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
uuidtools (2.1.5)
- will_paginate (3.1.6)
- will_paginate-bootstrap (1.0.1)
+ will_paginate (3.1.7)
+ will_paginate-bootstrap (1.0.2)
will_paginate (>= 3.0.3)
PLATFORMS
@@ -174,7 +174,7 @@ DEPENDENCIES
geokit-rails (= 1.1.4)
image_science (= 1.2.6)
jshintrb
- mysql2 (~> 0.3.20)
+ mysql2 (< 0.4)
oa-openid (= 0.3.2)
open_id_authentication
paperclip (~> 4.2.2)
@@ -191,11 +191,11 @@ DEPENDENCIES
test-unit
therubyracer
uglifier
- will_paginate (= 3.1.6)
+ will_paginate (= 3.1.7)
will_paginate-bootstrap
RUBY VERSION
ruby 2.4.4p296
BUNDLED WITH
- 1.16.2
+ 1.17.1
diff --git a/MYSQL.md b/MYSQL.md
new file mode 100644
index 000000000..711b3f960
--- /dev/null
+++ b/MYSQL.md
@@ -0,0 +1,149 @@
+# installation troubleshooting & instructions
+
+## System Agnostic
+
+- bundler skipping over **mysql2** gem?
+
+```Bash
+
+$ rm .bundle/config
+
+$ bundle exec bundle install
+
+```
+
+
+
+## MacOS
+
+**Homebrew setup:**
+
+(Note: alternative to Homebrew is [mySQL community server](https://dev.mysql.com/downloads/mysql/5.7.html#downloads) - available for all systems)
+
+Dependencies:
+
+- `cmake`
+
+- `openssl`
+
+```Bash
+
+$ brew install cmake
+
+$ brew install openssl
+
+```
+
+Installation:
+
+```Bash
+
+#make sure you don't have any other versions of mysql installed
+$ brew list
+
+#if you do
+$ brew uninstall