• Overview
    Frameworks
    • Drupal
    • WordPress
    • Symfony
    • Magento
    • See all frameworks
    Features
    • Observability
    • Auto-scaling
    Solutions
    • Marketing Teams
    • Retail
    • Higher Education
  • Pricing
  • Featured articles
    • Switching to Platform.sh can help IT/DevOps organizations drive 219% ROI
    • Organizations, the ultimate way to manage your users and projects
  • Support
  • Docs
  • Contact
  • Login
  • Free Trial
Blog
Thumbnail

Give the gift of Ruby this season

rubyruby
December 18, 2018
Ori Pekelman
Ori Pekelman
CPO

We've had Ruby 2.5 in beta for a while now, although we haven't talked about it much. It's been working wonderfully, though, and rubies make great holiday gifts for the geologists in your life. So it's time to go General Availability!

What gems does this version have?

Ruby 2.5 has a bunch of very cool language features, and probably the most interesting is yield_self; it rather resembles the pipe operator from Elixir, and pipes are cool. Method chaining is also a great way to simplify syntax, and this basically gives you a more general approach then the .map and .select we're already used to.

Also nice in day-to-day life "rescue in do blocks" it reduces clutter and unnecessary indentation.

things.each do |thing|
  thing.evil_method_that_bombs
rescue VeryBadError => exception
  p exception
  next
end

Short and sweet.

Is it expensive like a real ruby?

Not at all! As always, migrating your Ruby apps is as easy as changing a single character in your .platform.app.yaml file:

so instead of :

type: "ruby:2.4"

Go for the brand new:

type: "ruby:2.5"

Create a branch, push, and test that everything works on your development environment. If it all checks out, merge. Now you're running Ruby 2.5 in production. (And you probably just gained around 10% performance, too. Go you!)

A number of Ruby applications already require 2.5 or higher, such as the latest Discourse betas. So if this is your jam...go forth and deploy.

Get the latest Platform.sh news and resources
Subscribe

Related Content

A metamorphosis

Apache Kafka now available

5
7
8
1
5
Deployments this week (including Fridays!)

Company

AboutSecurity and complianceTrust CenterBoard and investorsCareersPressContact us
5
7
8
1
5
Deployments this week (including Fridays!)
System StatusPrivacyTerms of ServiceImpressumWCAG ComplianceManage your cookie preferencesReport a security issue
© 2022 Platform.sh. All rights reserved.
Supported by Horizon 2020's SME Instrument - European Commission 🇪🇺