What's New

IBM Cloud Functions Adds Support for Ruby 2.5

Share this post:

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

Senior Technical Staff Member (STSM) - IBM Cloud Functions

More What's New stories
December 20, 2018

Announcing the Beta Launch of IBM Digital App Builder

Building a digital app is easy with the IBM Digital App Builder tool. Using this tool, a citizen developer can quickly build a smart app which contains the basic building blocks, connect to microservices, and embed AI services with ease.

Continue reading

December 20, 2018

Announcing Early Access of Voice Agent with Watson Analysis Dashboard

Announcing alpha availability of the Voice Agent with Watson dashboard, providing insights into usage of Watson over the phone.

Continue reading

December 14, 2018

IBM Cloud Functions Adds Native Support for Go 1.11

IBM Cloud Functions now natively supports Go. You can easily write function and process the input and the output with normal parameters and return values.

Continue reading