diff --git a/snooty.toml b/snooty.toml index 96d9e22df..a3a760858 100644 --- a/snooty.toml +++ b/snooty.toml @@ -1,6 +1,9 @@ name = "ruby-driver" title = "Ruby MongoDB Driver" -toc_landing_pages = ["/connect"] +toc_landing_pages = [ + "/get-started", + "/connect" +] intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/" diff --git a/source/get-started.txt b/source/get-started.txt new file mode 100644 index 000000000..6058a5926 --- /dev/null +++ b/source/get-started.txt @@ -0,0 +1,48 @@ +.. _ruby-get-started: + +================================ +Get Started with the Ruby Driver +================================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :description: Learn how to create an app to connect to MongoDB deployment by using the Ruby driver. + :keywords: quick start, tutorial, basics + +.. toctree:: + + Download & Install + +.. TODO: + Create a Deployment + Create a Connection String + Connect to MongoDB + Next Steps + +Overview +-------- + +The {+driver-long+} is a library that allows Ruby applications to interact with +MongoDB databases. You can use the {+driver-short+} to connect to MongoDB and perform +common data operations. This guide shows you how to create an application that uses the +{+driver-short+} to connect to a MongoDB cluster hosted on MongoDB Atlas +and query data in your cluster. + +.. tip:: + + MongoDB Atlas is a fully managed cloud database service that hosts your MongoDB + deployments. You can create your own free (no credit card required) MongoDB Atlas + deployment by following the steps in this guide. + +If you prefer to use a different driver or programming language to connect to +MongoDB, see our :driver:`list of official drivers <>`. + diff --git a/source/get-started/download-and-install.txt b/source/get-started/download-and-install.txt new file mode 100644 index 000000000..d2e0ee9ec --- /dev/null +++ b/source/get-started/download-and-install.txt @@ -0,0 +1,65 @@ +.. _ruby-quick-start-download-and-install: + +==================== +Download and Install +==================== + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: installation, setup, code example + +.. procedure:: + :style: connected + + .. step:: Install dependencies + + Before you begin developing, ensure you install `Ruby + `__ version 2.7 + or later in your development environment. {+language+} + is pre-installed on macOS and some Linux distributions, + but you might need to update your version. + + .. important:: + + The {+driver-short+} is not officially supported on Windows. + + .. step:: Create a project directory + + Run the following command in your shell to create a directory + called ``ruby-quickstart`` for this project: + + .. code-block:: bash + + mkdir ruby-quickstart + + Then, run the following commands to create a ``quickstart.rb`` file in + the ``ruby-quickstart`` directory: + + .. code-block:: bash + + cd ruby-quickstart + touch quickstart.rb + + .. step:: Add the {+driver-short+} to your project + + Open the ``quickstart.rb`` file and add the following code: + + .. code-block:: ruby + + require 'bundler/inline' + + gemfile do + source 'https://rubygems.org' + gem 'mongo' + end + + This code adds the {+driver-short+} as a dependency by + using the `Bundler `__ dependency management tool. + +After you complete these steps, you have a new project directory with the driver +dependencies installed. + +.. include:: /includes/get-started/troubleshoot.rst diff --git a/source/includes/get-started/troubleshoot.rst b/source/includes/get-started/troubleshoot.rst new file mode 100644 index 000000000..6860d7be7 --- /dev/null +++ b/source/includes/get-started/troubleshoot.rst @@ -0,0 +1,6 @@ +.. note:: + + If you run into issues on this step, ask for help in the + :community-forum:`MongoDB Community Forums ` + or submit feedback by using the :guilabel:`Rate this page` + tab on the right side of this page. \ No newline at end of file diff --git a/source/index.txt b/source/index.txt index f94cdfe05..c696db05f 100644 --- a/source/index.txt +++ b/source/index.txt @@ -11,13 +11,13 @@ .. toctree:: :titlesonly: :maxdepth: 1 - + + Get Started + Connect View the Source API Documentation <{+api-root+}> .. TODO: - Get Started - Connect Databases & Collections Read Data Write Data @@ -37,12 +37,11 @@ Introduction Welcome to the documentation site for the {+driver-long+}, the official MongoDB driver for {+language+} applications. -.. TODO: -.. Get Started -.. ----------- +Get Started +----------- -.. Learn how to install the driver, establish a connection to MongoDB, and begin -.. working with data in the :ref:`ruby-get-started` tutorial. +Learn how to install the driver, establish a connection to MongoDB, and begin +working with data in the :ref:`ruby-get-started` tutorial. .. Connect to MongoDB .. ------------------