Skip to content

Commit 0d4b6e1

Browse files
committed
Update Ruby Couchbase ORM quickstart tutorial to correct directory name, install additional gem, and reflect port change to 3000 for application and Swagger documentation access.
1 parent 79e6a5e commit 0d4b6e1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tutorial/markdown/ruby/ruby-couchbase-orm/quickstart-ruby-couchbase-orm.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ git clone https://github.com/couchbase-examples/ruby-couchbase-orm-quickstart.gi
6060
The dependencies for the application are specified in the `Gemfile` file in the source folder. Dependencies can be installed through `bundler` the default package manager for Ruby.
6161

6262
```shell
63-
cd ruby-on-rails-quickstart
63+
cd ruby-couchbase-orm-quickstart
6464
gem install bundler
6565
bundle install
6666
```
@@ -73,6 +73,7 @@ gem install rspec
7373
gem install rubocop
7474
gem install rswag
7575
gem install couchbase
76+
gem install couchbase-orm
7677
```
7778

7879
> Refer to the [instructions in the SDK](https://github.com/couchbase/couchbase-ruby-client#installation) for more info. -->
@@ -108,14 +109,14 @@ To use Couchbase ORM in your Ruby application, you need to configure the connect
108109
109110
Replace the values for `connection_string`, `bucket`, `username`, and `password` with your actual Couchbase Server connection details.
110111

111-
Couchbase ORM will automatically load the configuration based on the current Rails environment.
112+
CouchbaseOrm will automatically load the configuration based on the current Rails environment.
112113

113114
2. **Non-Rails Applications**:
114115

115116
For non-Rails applications, you can configure the connection settings programmatically. Add the following code to your application's initialization file or before you start using Couchbase ORM:
116117

117118
```ruby
118-
Couchbase ORM.configure do |config|
119+
CouchbaseOrm.configure do |config|
119120
config.connection_string = 'couchbase://localhost'
120121
config.bucket = 'my_app'
121122
config.username = 'my_username'
@@ -131,9 +132,9 @@ To use Couchbase ORM in your Ruby application, you need to configure the connect
131132

132133
At this point, we have installed the dependencies, loaded the travel-sample data and configured the application with the credentials. The application is now ready and you can run it.
133134

134-
The application will run on port 8080 of your local machine (http://localhost:8080). You will find the Swagger documentation of the API which you can use to try the API endpoints.
135+
The application will run on port 3000 of your local machine (http://localhost:3000). You will find the Swagger documentation of the API which you can use to try the API endpoints.
135136

136-
The Swagger Page will be available at [http://localhost:8080/api-docs](http://localhost:8080/api-docs).
137+
The Swagger Page will be available at http://localhost:3000/api-docs.
137138

138139
```shell
139140
rails s
@@ -146,7 +147,6 @@ If you prefer to run this quick start using Docker, we have provided the Dockerf
146147
- Build the Docker image
147148

148149
```sh
149-
cd src
150150
docker build -t ruby-couchbase-orm-quickstart .
151151
```
152152

@@ -156,17 +156,17 @@ docker build -t ruby-couchbase-orm-quickstart .
156156
docker run --env-file dev.env -p 3000:3000 ruby-couchbase-orm-quickstart
157157
```
158158

159-
> Note: The `.env` file has the connection information to connect to your Capella cluster. With the `--env-file`, docker will inject those environment variables to the container.
159+
> Note: This app reads Couchbase connection settings from `config/couchbase.yml`. Ensure this file is included in the image (COPY) or mount it into the container at runtime.
160160

161-
Once the app is up and running, you can launch your browser and go to the [Swagger documentation](https://localhost:8080/) to test the APIs.
161+
Once the app is up and running, open http://localhost:3000/api-docs to test the APIs.
162162

163163
### Verifying the Application
164164

165165
Once the application starts, you can see the details of the application on the logs.
166166

167167
![Application Startup](app_startup.png)
168168

169-
The application will run on port 8080 of your local machine (http://localhost:8080). You will find the interactive Swagger documentation of the API if you go to the URL in your browser. Swagger documentation is used in this demo to showcase the different API end points and how they can be invoked. More details on the Swagger documentation can be found in the [appendix](#swagger-documentation).
169+
The application will run on port 3000 of your local machine (http://localhost:3000). You will find the interactive Swagger documentation of the API if you go to the URL in your browser. Swagger documentation is used in this demo to showcase the different API end points and how they can be invoked. More details on the Swagger documentation can be found in the [appendix](#swagger-documentation).
170170

171171
![Swagger Documentation](swagger_documentation.png)
172172

0 commit comments

Comments
 (0)