@@ -16,32 +16,15 @@ Download and Install
16
16
17
17
.. step:: Install dependencies
18
18
19
- Before you begin developing, ensure you have the following dependencies
20
- installed in your development environment:
21
-
22
- - `Ruby <https://www.ruby-lang.org/en/downloads/>`__ version 2.7
23
- or later
24
- - `bson <https://rubygems.org/gems/bson>`__ version 4.14.1 or later, up to
25
- version 6.0
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.
26
24
27
- .. note ::
25
+ .. important ::
28
26
29
- {+language+} is pre-installed on macOS and some Linux distributions,
30
- but the system version might be outdated. You can use a package
31
- manager, such as `Homebrew <https://formulae.brew.sh/formula/ruby>`__,
32
- to install the latest {+language+} version.
33
-
34
- .. step:: Install the {+driver-short+}
35
-
36
- From your shell, run the following command to install
37
- the {+driver-short+}:
38
-
39
- .. code-block:: bash
40
-
41
- gem install mongo
42
-
43
- This command installs version {+version-number+} of
44
- the driver.
27
+ The {+driver-short+} is not officially supported on Windows.
45
28
46
29
.. step:: Create a project directory
47
30
@@ -52,26 +35,29 @@ Download and Install
52
35
53
36
mkdir ruby-quickstart
54
37
55
- Select the tab corresponding to your operating system and run the following commands
56
- to create a ``quickstart.rb`` file in the ``ruby-quickstart`` directory:
38
+ Then, run the following commands to create a ``quickstart.rb`` file in
39
+ the ``ruby-quickstart`` directory:
57
40
58
- .. tabs::
41
+ .. code-block:: bash
59
42
60
- .. tab:: macOS / Linux
61
- :tabid: create-file-mac-linux
43
+ cd ruby-quickstart
44
+ touch quickstart.rb
62
45
63
- .. code-block:: bash
46
+ .. step:: Add the {+driver-short+} to your project
64
47
65
- cd ruby-quickstart
66
- touch quickstart.rb
48
+ Open the ``quickstart.rb`` file and add the following code:
67
49
68
- .. tab:: Windows
69
- :tabid: create-file-windows
50
+ .. code-block:: bash
51
+
52
+ require 'bundler/inline'
70
53
71
- .. code-block:: bash
54
+ gemfile do
55
+ source 'https://rubygems.org'
56
+ gem 'mongo'
57
+ end
72
58
73
- cd ruby-quickstart
74
- type nul > quickstart.rb
59
+ This code adds the {+driver-short+} as a dependency by
60
+ using the `Bundler <https://bundler.io/>`__ dependency management tool.
75
61
76
62
After you complete these steps, you have a new project directory with the driver
77
63
dependencies installed.
0 commit comments