0

I have an existing Rails app that's been sitting on an old Ubuntu 14.04 server on AWS, and I've recently moved the staging environment over to a new AWS EC2 instance running Ubuntu 18.04.

I'm not a Ubuntu expert by any means - hence this question - but with the very recent release of 20.04 and it being available on EC2, should I go for that if my goal is just to bring things up to speed in terms of security, performance, and general maintainability?

I went with 18.04 initially for the upgrade thinking that any issues I might encounter would be well covered on Stack Overflow, Digital Ocean tutorials, etc.

So I guess my question boils down to, is it prudent to not jump on a freshly released Ubuntu LTS release? Or is it generally accepted that the latest release is the best no matter what?

DelPiero
  • 101
  • 1
  • If you deploy to a Docker container, it doesn't matter what version the host is. Something to think about. – Bert Apr 30 '20 at 14:42

1 Answers1

0

Ok, I think I can answer my own question. I went ahead and tried it, after all it doesn't take that long to spin up a new EC2 instance and set it up for Ruby on Rails.

The setup process was easy and largely the same as with 18.04. The problems arrived when it came time to set up MySQL. Ubuntu 20.04 installs MySQL 8 by default, and up until then I had only dealt with up to MySQL 5.7.

Maybe it's the fact that my app is on Rails 4 and Ruby 2.4, but I ran into loads of trouble when trying to deploy. The culprit - I think - is the mysql2 gem. It was one segmentation fault after another during the deploy, and while I was able to finally deploy successfully after upgrading that gem to the 0.5.x version, that branch is only compatible with Rails 5 and up.

While it looks like you can install MySQL 5.7 on Ubuntu 20.4, it's not super straightforward and honestly the performance difference between 18.04 and 20.04 isn't that different.

I know everyone's Ruby/Rails/gem versions are pretty specific but I hope this helps someone else.

DelPiero
  • 101
  • 1