IBM Cloud Functions Adds Support for Ruby 2.5

By: Carlos Santana

What’s happening with IBM Cloud Functions and Ruby?

Are you eager to jump into the new and modern way of building event-driven solutions? Is Ruby your go-to programming language? Excellent! IBM Cloud Functions is welcoming Ruby 2.5 as a natively supported programming language. Now, you can join the Serverless revolution and start building cloud-native apps without worrying about scaling or infrastructure management by using Function-as-a-Service.

What does it look like?

A simple action would look like the following example:

def main(param)
name = param["name"] || "IBM Cloud"
greeting = "Hello #{name}!"
puts greeting
{ "body" => greeting }
end

How do I get started?

Ready to give it a go? Try deploying this example action by using the IBM Cloud CLI or dashboard.

To create a web action with the IBM Cloud Functions CLI plugin, you would run the following command:

ibmcloud fn action create helloRuby hello.rb --kind ruby:2.5 --web true

To get the URL for the web action and open it in your browser, run the following command:

ibmcloud fn action get helloRuby --url

How do I learn more?

You can find specific information about creating actions in the IBM Cloud Functions docs. To go further, you can check out this blog: Ruby goes Serverless! – Apache OpenWhisk adds native support for Ruby

Be the first to hear about news, product updates, and innovation from IBM Cloud