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:
- You can reach us directly at [email protected].
- Join our Discord community.
- Follow us on Twitter.