Use ruby 2.5 on Ubuntu 18.04
authorTom Hughes <tom@compton.nu>
Sat, 30 Jun 2018 10:33:46 +0000 (11:33 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 30 Jun 2018 10:33:46 +0000 (11:33 +0100)
cookbooks/db/recipes/base.rb

index 2a509f1..6d6bc8d 100644 (file)
@@ -34,8 +34,14 @@ directory "/srv/www.openstreetmap.org" do
   mode 0o2775
 end
 
+ruby_version = if node[:lsb][:release].to_f >= 18.04
+                 "2.5"
+               else
+                 "2.3"
+               end
+
 rails_port "www.openstreetmap.org" do
-  ruby "2.3"
+  ruby ruby_version
   directory "/srv/www.openstreetmap.org/rails"
   user "rails"
   group "rails"