]> git.openstreetmap.org Git - chef.git/commitdiff
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 2a509f1303b3c9484776809c617aafedcf2dbd5c..6d6bc8ddc90b7c65c618ec8d2658a0fec662a3a7 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"