File tree 5 files changed +107
-10
lines changed
5 files changed +107
-10
lines changed Original file line number Diff line number Diff line change 1
1
name = " ruby-driver"
2
2
title = " Ruby MongoDB Driver"
3
- toc_landing_pages = [" /connect" ]
3
+ toc_landing_pages = [
4
+ " /get-started" ,
5
+ " /connect"
6
+ ]
4
7
5
8
intersphinx = [" https://www.mongodb.com/docs/manual/objects.inv" ]
6
9
sharedinclude_root = " https://raw.githubusercontent.com/10gen/docs-shared/main/"
Original file line number Diff line number Diff line change @@ -13,12 +13,36 @@ Get Started with the Ruby Driver
13
13
.. facet::
14
14
:name: genre
15
15
:values: tutorial
16
-
16
+
17
17
.. meta::
18
18
:description: Learn how to create an app to connect to MongoDB deployment by using the Ruby driver.
19
19
:keywords: quick start, tutorial, basics
20
20
21
21
.. toctree::
22
22
23
+ Download & Install </get-started/download-and-install/>
23
24
Create a Deployment </get-started/create-a-deployment>
24
- Create a Connection String </get-started/create-a-connection-string>
25
+ Create a Connection String </get-started/create-a-connection-string>
26
+
27
+ .. TODO:
28
+ Connect to MongoDB </get-started/connect-to-mongodb>
29
+ Next Steps </get-started/next-steps>
30
+
31
+ Overview
32
+ --------
33
+
34
+ The {+driver-long+} is a library that allows Ruby applications to interact with
35
+ MongoDB databases. You can use the {+driver-short+} to connect to MongoDB and perform
36
+ common data operations. This guide shows you how to create an application that uses the
37
+ {+driver-short+} to connect to a MongoDB cluster hosted on MongoDB Atlas
38
+ and query data in your cluster.
39
+
40
+ .. tip::
41
+
42
+ MongoDB Atlas is a fully managed cloud database service that hosts your MongoDB
43
+ deployments. You can create your own free (no credit card required) MongoDB Atlas
44
+ deployment by following the steps in this guide.
45
+
46
+ If you prefer to use a different driver or programming language to connect to
47
+ MongoDB, see our :driver:`list of official drivers <>`.
48
+
Original file line number Diff line number Diff line change
1
+ .. _ruby-quick-start-download-and-install:
2
+
3
+ ====================
4
+ Download and Install
5
+ ====================
6
+
7
+ .. facet::
8
+ :name: genre
9
+ :values: tutorial
10
+
11
+ .. meta::
12
+ :keywords: installation, setup, code example
13
+
14
+ .. procedure::
15
+ :style: connected
16
+
17
+ .. step:: Install dependencies
18
+
19
+ Before you begin developing, ensure you install `Ruby
20
+ <https://www.ruby-lang.org/en/downloads/>`__ version 2.7
21
+ or later in your development environment. {+language+}
22
+ is pre-installed on macOS and some Linux distributions,
23
+ but you might need to update your version.
24
+
25
+ .. important::
26
+
27
+ The {+driver-short+} is not officially supported on Windows.
28
+
29
+ .. step:: Create a project directory
30
+
31
+ Run the following command in your shell to create a directory
32
+ called ``ruby-quickstart`` for this project:
33
+
34
+ .. code-block:: bash
35
+
36
+ mkdir ruby-quickstart
37
+
38
+ Then, run the following commands to create a ``quickstart.rb`` file in
39
+ the ``ruby-quickstart`` directory:
40
+
41
+ .. code-block:: bash
42
+
43
+ cd ruby-quickstart
44
+ touch quickstart.rb
45
+
46
+ .. step:: Add the {+driver-short+} to your project
47
+
48
+ Open the ``quickstart.rb`` file and add the following code:
49
+
50
+ .. code-block:: ruby
51
+
52
+ require 'bundler/inline'
53
+
54
+ gemfile do
55
+ source 'https://rubygems.org'
56
+ gem 'mongo'
57
+ end
58
+
59
+ This code adds the {+driver-short+} as a dependency by
60
+ using the `Bundler <https://bundler.io/>`__ dependency management tool.
61
+
62
+ After you complete these steps, you have a new project directory with the driver
63
+ dependencies installed.
64
+
65
+ .. include:: /includes/get-started/troubleshoot.rst
Original file line number Diff line number Diff line change
1
+ .. note ::
2
+
3
+ If you run into issues on this step, ask for help in the
4
+ :community-forum: `MongoDB Community Forums <tag/ruby/> `
5
+ or submit feedback by using the :guilabel: `Rate this page `
6
+ tab on the right side of this page.
Original file line number Diff line number Diff line change 11
11
.. toctree::
12
12
:titlesonly:
13
13
:maxdepth: 1
14
-
14
+
15
15
Get Started </get-started>
16
+ Connect </connect>
16
17
View the Source <https://github.com/mongodb/mongo-ruby-driver>
17
18
API Documentation <{+api-root+}>
18
19
19
20
.. TODO:
20
- Connect </connect>
21
21
Databases & Collections </databases-collections>
22
22
Read Data </read>
23
23
Write Data </write>
@@ -37,12 +37,11 @@ Introduction
37
37
Welcome to the documentation site for the {+driver-long+}, the official
38
38
MongoDB driver for {+language+} applications.
39
39
40
- .. TODO:
41
- .. Get Started
42
- .. -----------
40
+ Get Started
41
+ -----------
43
42
44
- .. Learn how to install the driver, establish a connection to MongoDB, and begin
45
- .. working with data in the :ref:`ruby-get-started` tutorial.
43
+ Learn how to install the driver, establish a connection to MongoDB, and begin
44
+ working with data in the :ref:`ruby-get-started` tutorial.
46
45
47
46
.. Connect to MongoDB
48
47
.. ------------------
You can’t perform that action at this time.
0 commit comments