Skip to main content

Meroxa Apps Init for Ruby

ยท 2 min read
Diana Doherty
Engineering
warning

This is a legacy platform changelog. The information reflected here may not represent current functionality and some links may be broken.

Getting started creating Turbine Ruby streaming applications has just gotten easier with the init support for Ruby!

Since Turbine Ruby is currently in Developer Preview, to participate, you'd need to sign up here and a member of our team will follow up to discuss the steps to get the feature enabled.

Once you've been granted access, simply install Meroxa CLI v2.12.0 and run meroxa apps init my-ruby-app-name --lang ruby --path path/to/my-ruby-app to generate an example application.

Upon running this command, a directory named my-ruby-app-name will be created in the indicated path (path/to/my-ruby-app).

The content of the directory will include:

my-ruby-app-name
โ”œโ”€โ”€ Gemfile
โ”œโ”€โ”€ app.json
โ”œโ”€โ”€ app.rb
โ””โ”€โ”€ fixtures
โ””โ”€โ”€ demo.json

Install the necessary dependencies with: bundle install.

You can run the application locally with: meroxa apps run.

$ meroxa apps run
got records: [#<TurbineRb::Record:0x00000001005da038 @key="1", @timestamp=<Google::Protobuf::Timestamp: seconds: -62135596800, nanos: 0>, @value={"message"=>"hello"}>]
+---------------------------------------+
| Destination demopg/collection_archive |
+-----------------+---------------------+
| INDEX | RECORD |
+-----------------+---------------------+
| 0 | {"message":"hello"} |
+-----------------+---------------------+
| RECORDS WRITTEN | 1 |
+-----------------+---------------------+

After building your desired data application, you can deploy it to Meroxa with: meroxa apps deploy.

For more information on how you can get started building Turbine Streaming Applications in Ruby, see our blog.

For details on on how to update to the latest CLI version, see our CLI guide.

For any questions or comments: