diff --git a/.travis.yml b/.travis.yml index 13518f915..a9844fa4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: xenial language: ruby rvm: - - 2.4.10 + - 2.5.9 env: SECRET_KEY_BASE=859384 RUN_SLOW_TESTS=true before_install: diff --git a/Dockerfile b/Dockerfile index 53effbf6e..47233d314 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.4.10 +FROM ruby:2.5.9 RUN mkdir /morph WORKDIR /morph # We need a javascript runtime diff --git a/Gemfile b/Gemfile index d25c93e54..73521fc13 100644 --- a/Gemfile +++ b/Gemfile @@ -94,6 +94,10 @@ gem "validate_url" # TODO: Remove this when we can gem "nio4r", "~> 2.4.0" +# Adding psych here to lock its version. psych 4.0 causes us issues with installing gems. Ugh. +# TODO: Remove this as soon as possible +gem "psych", "< 4.0.0" + group :production do # 3.0.0 requires ruby 2.5 or higher. # TODO: Remove version lock as soon as we have upgraded to ruby 2.5 diff --git a/Gemfile.lock b/Gemfile.lock index 3e3ef7df2..da57ef952 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -377,8 +377,7 @@ GEM pry-stack_explorer (0.4.13) binding_of_caller (~> 0.7) pry (~> 0.13) - psych (4.0.4) - stringio + psych (3.3.2) public_suffix (4.0.7) puma (5.6.4) nio4r (~> 2.0) @@ -436,8 +435,7 @@ GEM rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) - rdoc (6.4.0) - psych (>= 4.0.0) + rdoc (6.3.3) redcarpet (3.5.1) redis (4.5.1) regexp_parser (2.5.0) @@ -555,7 +553,6 @@ GEM sshkit (1.21.2) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - stringio (3.0.2) stripe (6.5.0) temple (0.8.2) thor (1.2.1) @@ -647,6 +644,7 @@ DEPENDENCIES pry-remote pry-rescue pry-stack_explorer + psych (< 4.0.0) puma rack-livereload rack-mini-profiler (< 3.0.0) diff --git a/README.md b/README.md index c64d14e1c..a8070c6df 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ * Email alerts for broken scrapers ## Dependencies -Ruby 2.4.10, Docker, MySQL, SQLite 3, Redis, mitmproxy. +Ruby 2.5.9, Docker, MySQL, SQLite 3, Redis, mitmproxy. (See below for more details about installing Docker) Development is supported on Linux (Ubuntu 20.04) and Mac OS X. diff --git a/config/deploy.rb b/config/deploy.rb index d038709f4..fc3238559 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,7 +1,7 @@ set :application, 'morph' set :repo_url, 'https://github.com/openaustralia/morph.git' -set :rvm_ruby_version, '2.4.10' +set :rvm_ruby_version, '2.5.9' # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } diff --git a/provisioning/roles/morph-app/templates/sites/morph.io b/provisioning/roles/morph-app/templates/sites/morph.io index 54ef77e7b..983f85327 100644 --- a/provisioning/roles/morph-app/templates/sites/morph.io +++ b/provisioning/roles/morph-app/templates/sites/morph.io @@ -3,7 +3,7 @@ server { server_name {{ server_name }} api.{{ server_name }}; root /var/www/current/public; passenger_enabled on; - passenger_ruby /home/deploy/.rvm/gems/ruby-2.4.10/wrappers/ruby; + passenger_ruby /home/deploy/.rvm/gems/ruby-2.5.9/wrappers/ruby; passenger_max_request_queue_size 300; # There's a lot of traffic coming to this one scraper. It was putting diff --git a/provisioning/roles/ruby/handlers/main.yml b/provisioning/roles/ruby/handlers/main.yml index 39a22cc22..c70d62573 100644 --- a/provisioning/roles/ruby/handlers/main.yml +++ b/provisioning/roles/ruby/handlers/main.yml @@ -1,4 +1,4 @@ --- -- name: Make ruby-2.4.10 the default - command: /bin/sh -l -c 'rvm alias create default ruby-2.4.10' +- name: Make ruby-2.5.9 the default + command: /bin/sh -l -c 'rvm alias create default ruby-2.5.9' become_user: deploy diff --git a/provisioning/roles/ruby/tasks/main.yml b/provisioning/roles/ruby/tasks/main.yml index c9c6b64c6..a3b4ec598 100644 --- a/provisioning/roles/ruby/tasks/main.yml +++ b/provisioning/roles/ruby/tasks/main.yml @@ -13,7 +13,7 @@ # TODO: Is it possible to extract this list of dependencies automatically from rvm? # Or allow rvm to do the install - but that would require the deploy user to have the permissions -- name: "Ensure ruby-2.4.10 dependencies installed" +- name: "Ensure ruby-2.5.9 dependencies installed" apt: pkg={{ item }} with_items: - patch @@ -37,11 +37,11 @@ - libssl-dev - libgmp-dev -- name: Install ruby-2.4.10 with rvm - command: /bin/sh -l -c 'rvm install ruby-2.4.10 --autolibs=read-fail' creates=/home/deploy/.rvm/rubies/ruby-2.4.10 +- name: Install ruby-2.5.9 with rvm + command: /bin/sh -l -c 'rvm install ruby-2.5.9 --autolibs=read-fail' creates=/home/deploy/.rvm/rubies/ruby-2.5.9 become_user: deploy - notify: Make ruby-2.4.10 the default + notify: Make ruby-2.5.9 the default -- name: Install bundler for ruby 2.4.10 - command: bash -lc "rvm ruby-2.4.10; gem install bundler --version 2.0.2" +- name: Install bundler for ruby 2.5.9 + command: bash -lc "rvm ruby-2.5.9; gem install bundler --version 2.0.2" become_user: deploy