Skip to content

Commit d12139c

Browse files
CI: Automatic .md and .mdx formatting
1 parent 2ad4424 commit d12139c

1 file changed

Lines changed: 25 additions & 23 deletions

File tree

docs/develop/ruby/set-up-local-ruby.mdx

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ tags:
1212
- Temporal SDKs
1313
---
1414

15-
This guide walks you through setting up the Temporal Ruby SDK and running your first Workflow.
16-
In just a few steps, you'll install the SDK and start a local development server.
15+
This guide walks you through setting up the Temporal Ruby SDK and running your first Workflow.
16+
In just a few steps, you'll install the SDK and start a local development server.
1717
To validate that your local environment is correctly installed, we will execute a Workflow that will output "Hello, Temporal".
1818

1919
## 1. Installation
@@ -115,8 +115,9 @@ You'll be able to monitor your Workflows through the Web UI as they execute.
115115
> ```
116116
117117
## 3. Write Your First Activity and Workflow
118-
Now that you have the server running, it's time to create your first Temporal application.
119-
In Temporal, you'll create two files an Activity file labeled `say_hello_activity.rb` and a Workflow file labeled `say_hello_workflow.rb`.
118+
119+
Now that you have the server running, it's time to create your first Temporal application.
120+
In Temporal, you'll create two files an Activity file labeled `say_hello_activity.rb` and a Workflow file labeled `say_hello_workflow.rb`.
120121
121122
<Tabs>
122123
<TabItem value="activity" label="Activity (say_hello_activity.rb)">
@@ -156,15 +157,15 @@ require_relative 'say_hello_activity'
156157
</Tabs>
157158

158159
A Temporal Workflow is your business logic, defined in code, outlining each step in your process.
159-
Activities are the individual units of work in your Workflow.
160-
Activities often involve interacting with the outside world, such as sending emails, making network requests, writing to a database, or calling an API, which are prone to failure.
161-
You can call Activities directly from your Workflow code.
162-
If an Activity fails, Temporal automatically retries it based on your configuration.
163-
160+
Activities are the individual units of work in your Workflow.
161+
Activities often involve interacting with the outside world, such as sending emails, making network requests, writing to a database, or calling an API, which are prone to failure.
162+
You can call Activities directly from your Workflow code.
163+
If an Activity fails, Temporal automatically retries it based on your configuration.
164164

165165
## 4. Run a Worker
166-
With your Activity and Workflow defined, you need a Worker to execute them.
167-
Create a file labeled `worker.rb`.
166+
167+
With your Activity and Workflow defined, you need a Worker to execute them.
168+
Create a file labeled `worker.rb`.\
168169
Workers, which are part of your application and provided by the Temporal SDK, then carry out the tasks defined in your Workflow.
169170

170171
<Tabs>
@@ -191,21 +192,22 @@ worker.run(shutdown_signals: ['SIGINT'])
191192
</TabItem>
192193
</Tabs>
193194

194-
Workers are a crucial part of your Temporal application as they're what actually execute the tasks defined in your Workflows and Activities.
195+
Workers are a crucial part of your Temporal application as they're what actually execute the tasks defined in your Workflows and Activities.
195196
For more information on Workers, see [Understanding Temporal](/evaluate/understanding-temporal#workers) and a [deep dive into Workers](/workers).
196197

197-
::: note
198+
::: note
198199
Start your Worker by running:
199-
`ruby worker.rb`
200+
`ruby worker.rb`
200201

201-
Keep this running in another terminal window.
202+
Keep this running in another terminal window.
202203
You should see output indicating that the Worker has started and is polling for tasks.
203204

204-
:::
205+
:::
205206

206207
## 5. Execute a Workflow and See the Result
207-
With your Worker running and listening for tasks, you can now trigger a Workflow execution.
208-
This final step will validate that everything is working correctly with your file labeled `execute_workflow.rb`.
208+
209+
With your Worker running and listening for tasks, you can now trigger a Workflow execution.
210+
This final step will validate that everything is working correctly with your file labeled `execute_workflow.rb`.
209211

210212
Run this script in a new terminal window with the following command: `ruby execute_workflow.rb`
211213

@@ -237,16 +239,16 @@ puts "Result: #{result}"
237239
Result: Hello, Temporal!
238240
```
239241

240-
You've successfully executed your first Temporal Workflow.
242+
You've successfully executed your first Temporal Workflow.
241243
If you check the Temporal Web UI at http://localhost:8233, you'll gain visibility into your Workflow Execution with details listed about its progress and completion.
242244

243-
## Next Steps
245+
## Next Steps
244246

245247
Now that your local environment is set up, you can explore the full capabilities of Temporal by following the [Getting Started with Ruby tutorials](https://learn.temporal.io/getting_started/ruby/).
246248
These tutorials will walk you through building and running your first Workflows using the Ruby SDK.
247249

248250
If you would like to better understand the underlying concepts behind what you have built, visit [Understanding Temporal](/understanding-temporal), which provides a basic high level overview of how the Temporal works.
249-
For more learning by doing, you can also explore our collection of [Ruby code samples](https://github.com/temporalio/samples-ruby) on GitHub.
251+
For more learning by doing, you can also explore our collection of [Ruby code samples](https://github.com/temporalio/samples-ruby) on GitHub.
250252

251-
To take the next step toward building production-ready applications, check out the [Core Application section](/develop/ruby/core-application) of the Ruby Developer Guide.
252-
This will help you understand how Temporal applications are structured.
253+
To take the next step toward building production-ready applications, check out the [Core Application section](/develop/ruby/core-application) of the Ruby Developer Guide.
254+
This will help you understand how Temporal applications are structured.

0 commit comments

Comments
 (0)