diff --git a/snooty.toml b/snooty.toml index 90142360..17839cec 100644 --- a/snooty.toml +++ b/snooty.toml @@ -6,6 +6,7 @@ intersphinx = [ "https://www.mongodb.com/docs/manual/objects.inv", ] toc_landing_pages = [ + "/quick-start-rails", "/quick-start-sinatra" ] @@ -18,5 +19,6 @@ full-version = "{+version+}.2" ruby-driver = "Ruby driver" language = "Ruby" quickstart-sinatra-app-name = "my-sinatra-app" +quickstart-rails-app-name = "my-rails-app" feedback-widget-title = "Feedback" server-manual = "Server manual" diff --git a/source/includes/figures/quickstart-rails-list.png b/source/includes/figures/quickstart-rails-list.png new file mode 100644 index 00000000..e6405847 Binary files /dev/null and b/source/includes/figures/quickstart-rails-list.png differ diff --git a/source/index.txt b/source/index.txt index 244c7194..31f5e279 100644 --- a/source/index.txt +++ b/source/index.txt @@ -10,15 +10,16 @@ MongoDB in Ruby. To work with {+odm+} from the command line using `_ utility. .. toctree:: - :titlesonly: - - /quick-start-sinatra - installation-configuration - tutorials - schema-configuration - working-with-data - API - release-notes - contributing - additional-resources - ecosystem + :titlesonly: + + /quick-start-rails + /quick-start-sinatra + installation-configuration + tutorials + schema-configuration + working-with-data + API + release-notes + contributing + additional-resources + ecosystem diff --git a/source/quick-start-rails.txt b/source/quick-start-rails.txt new file mode 100644 index 00000000..c69b8418 --- /dev/null +++ b/source/quick-start-rails.txt @@ -0,0 +1,76 @@ +.. _mongoid-quick-start-rails: + +=========================== +Quick Start (Ruby on Rails) +=========================== + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: ruby framework, odm + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Overview +-------- + +This guide shows you how to use {+odm+} in a new **Ruby on Rails 7 (Rails)** +web application, connect to a MongoDB cluster hosted on MongoDB +Atlas, and perform read and write operations on the data in your +cluster. + +.. tip:: + + If you prefer to connect to MongoDB by using the {+ruby-driver+} without + {+odm+}, see the {+ruby-driver+} :ruby:`Quick Start guide + `. + +{+odm+} is an Object-Document Mapper (ODM) framework for MongoDB in +Ruby. By using {+odm+}, you can easily interact with your data and +create flexible data models. + +Ruby on Rails is a web application framework for +{+language+}. Rails applications use a model-view-controller (MVC) +architecture that allows you to easily control how your data is +modeled and displayed. {+odm+} replaces the default ``ActiveRecord`` +adapter for data modeling in Rails. + +To learn more about Ruby on Rails, see the `Getting Started +with Rails `__ +guide in the Rails documentation. + +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. + +Follow the steps in this guide to create a sample {+odm+} web application +that connects to a MongoDB deployment. + +.. tip:: Other Framework Tutorials + + If you prefer to use Rails 6 to build your application, see the + :ref:`mongoid-getting-started-rails-6` guide. + + If you prefer to use Sinatra as your web framework, see the + :ref:`mongoid-quick-start-sinatra` guide. + +.. TODO .. tip:: +.. +.. You can download the complete web application project by cloning the +.. `mongoid-quickstart <>`__ GitHub repository. + +.. toctree:: + + /quick-start-rails/download-and-install/ + /quick-start-rails/create-a-deployment/ + /quick-start-rails/create-a-connection-string/ + /quick-start-rails/configure-mongodb/ + /quick-start-rails/view-data/ + /quick-start-rails/write-data/ + /quick-start-rails/next-steps/ diff --git a/source/quick-start-rails/configure-mongodb.txt b/source/quick-start-rails/configure-mongodb.txt new file mode 100644 index 00000000..7847e0c5 --- /dev/null +++ b/source/quick-start-rails/configure-mongodb.txt @@ -0,0 +1,62 @@ +.. _mongoid-quick-start-rails-connect-to-mongodb: + +================================= +Configure Your MongoDB Connection +================================= + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: test connection, runnable, code example + +.. procedure:: + :style: connected + + .. step:: Configure application for MongoDB + + To configure your application to use MongoDB and {+odm+} as your + ODM, run the following command from the root of your project: + + .. code-block:: bash + + bin/rails g mongoid:config + + After the command completes successfully, your application + contains the ``config/mongoid.yml`` file to configure the + connection to the MongoDB deployment. Your application also + includes the ``config/initializers/mongoid.rb`` file for more + advanced configuration. + + .. step:: Specify target database in connection string + + When connecting to an Atlas cluster, you must specify the database that + you want to interact with as the default database in your connection string. + You must add the database name to your connection string *after the hostname*. + + The following example specifies the ``sample_restaurants`` target database + in a sample connection string: + + .. code-block:: none + + mongodb+srv://user0:pass123@mongo0.example.com/sample_restaurants + + .. step:: Specify connection in mongoid.yml + + Paste the following configuration into the ``config/mongoid.yml`` file, + making sure to replace the ```` placeholder + with your connection string that references the target database: + + .. code-block:: yaml + :emphasize-lines: 4 + + development: + clients: + default: + uri: + +After completing these steps, your Rails web application is ready to +connect to MongoDB. + +.. include:: /includes/quick-start/troubleshoot.rst diff --git a/source/quick-start-rails/create-a-connection-string.txt b/source/quick-start-rails/create-a-connection-string.txt new file mode 100644 index 00000000..e9b0a095 --- /dev/null +++ b/source/quick-start-rails/create-a-connection-string.txt @@ -0,0 +1,7 @@ +.. _mongoid-quick-start-rails-create-cxn-str: + +========================== +Create a Connection String +========================== + +.. include:: /includes/quick-start/create-cxn-str.rst \ No newline at end of file diff --git a/source/quick-start-rails/create-a-deployment.txt b/source/quick-start-rails/create-a-deployment.txt new file mode 100644 index 00000000..edfdfed0 --- /dev/null +++ b/source/quick-start-rails/create-a-deployment.txt @@ -0,0 +1,7 @@ +.. _mongoid-quick-start-rails-create-deployment: + +=========================== +Create a MongoDB Deployment +=========================== + +.. include:: /includes/quick-start/create-deployment.rst diff --git a/source/quick-start-rails/download-and-install.txt b/source/quick-start-rails/download-and-install.txt new file mode 100644 index 00000000..88fa652d --- /dev/null +++ b/source/quick-start-rails/download-and-install.txt @@ -0,0 +1,121 @@ +.. _mongoid-quick-start-rails-download-and-install: + +==================== +Download and Install +==================== + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: ruby framework, odm, code example + +Prerequisites +------------- + +To create the Quick Start application by using Ruby on Rails 7, you need the +following software installed in your development environment: + +- `{+language+}. `__ + Rails requires {+language+} v3.1.0 or later. Use the latest version + to prevent version conflicts. +- `RubyGems package manager. `__ +- A terminal app and shell. For MacOS users, use Terminal or a similar app. + For Windows users, use PowerShell. + +.. tip:: Rails 6 Tutorial + + If you prefer to use Rails 6 to build your application, see the + :ref:`mongoid-getting-started-rails-6` guide. + +Download and Install the {+odm+} and Framework Gems +--------------------------------------------------- + +In {+language+}, packages are called **gems**. + +Complete the following steps to install and add the {+odm+} and Rails +gems to your web application. + +.. procedure:: + :style: connected + + .. step:: Install Rails + + Install the ``rails`` gem, which provides a command-line + interface to create a basic application structure and application + components. + + Run the following command to install ``rails``: + + .. code-block:: bash + + gem install rails + + .. step:: Create a Rails app with default scaffolding + + Run the following commands to create a new Rails application + directory with default scaffolding and enter the application: + + .. code-block:: bash + + rails new {+quickstart-rails-app-name+} --skip-active-record + cd {+quickstart-rails-app-name+} + + The ``--skip-active-record`` flag instructs Rails to not add + ``ActiveRecord`` as a dependency. You don't need this + dependency because you will use {+odm+} + instead. + + .. tip:: MacOS Installation Issue + + If you are using macOS, you might encounter issues when creating a + new Rails app during the automatic bundle installation step. + First, make sure that your macOS and `Xcode + `__ versions are up to + date. If you receive an error message similar to the following, + you must update or configure your build tools: + + .. code-block:: none + :copyable: false + + The compiler failed to generate an executable file. + ... + (RuntimeError) You have to install development tools first. + + Run the following commands to install Xcode command line tools: + + .. code-block:: bash + + xcode-select --install + xcodebuild -license accept + + Then, try to run the ``bundle install`` command again. + + .. step:: Add the {+odm+} gem + + Open the ``Gemfile`` in your application and add the following + entry: + + .. code-block:: ruby + + gem 'mongoid' + + .. step:: Install gems + + Run the following command to install the gems into your + application: + + .. code-block:: bash + + gem install bundler + bundle install + + When the command runs successfully, the output in your + shell contains a ``Bundle complete!`` message and describes the + number of new gems installed. + + After completing these steps, you have a new Rails web application with + {+odm+} installed. + +.. include:: /includes/quick-start/troubleshoot.rst diff --git a/source/quick-start-rails/next-steps.txt b/source/quick-start-rails/next-steps.txt new file mode 100644 index 00000000..9e7bcde4 --- /dev/null +++ b/source/quick-start-rails/next-steps.txt @@ -0,0 +1,32 @@ +.. _mongoid-quick-start-rails-next-steps: + +========== +Next Steps +========== + +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: learn more + +Congratulations on completing the Quick Start tutorial for Ruby on Rails +7! + +After you complete these steps, you have a Rails web application that +uses {+odm+} to connect to your MongoDB deployment, run a query on +the sample data, and render retrieved results. + +.. TODO You can download the completed web application project by cloning the +.. `mongoid-quickstart <>`__ +.. GitHub repository. + +.. TODO Learn more about {+odm+} features from the following resources: + +.. - :ref:`mongoid-fundamentals-connection`: Learn how to configure your MongoDB +.. connection. +.. +.. - :ref:`mongoid-usage-examples`: See code examples of frequently used MongoDB +.. operations. + diff --git a/source/quick-start-rails/view-data.txt b/source/quick-start-rails/view-data.txt new file mode 100644 index 00000000..57ad2ef2 --- /dev/null +++ b/source/quick-start-rails/view-data.txt @@ -0,0 +1,91 @@ +.. _mongoid-quick-start-rails-view-data: + +================= +View MongoDB Data +================= + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: test connection, runnable, code example + +.. procedure:: + :style: connected + + .. step:: Create a data model + + Run the following command from your project root to create a + ``Restaurant`` model with ``name``, ``cuisine``, and ``borough`` + fields: + + .. code-block:: bash + + bin/rails g scaffold Restaurant name:string cuisine:string borough:string + + This command also creates the controller and view files for the + ``Restaurant`` model. You can find the directories that contain + these files in the ``app`` directory of your application. + + .. step:: Retrieve specific documents + + The ``app/controllers/restaurants_controller.rb`` file contains + methods that specify how your app handles different + requests. Replace the ``index()`` method body with the following code: + + .. code-block:: ruby + + def index + @restaurants = Restaurant + .where(name: /earth/i) + end + + This controller method retrieves ``Restaurant`` documents in which the + value of the ``name`` field contains the string ``"earth"``. The + results are rendered at the ``/restaurants`` route by default. + + .. step:: Start your Rails application + + Run the following command from the application root directory + to start your {+language+} web server: + + .. code-block:: bash + + bin/rails s + + After the server starts, it outputs the following message + indicating that the application is running on port ``3000``: + + .. code-block:: none + :copyable: false + + => Booting Puma + => Rails 7.2.1 application starting in development + => Run `bin/rails server --help` for more startup options + Puma starting in single mode... + * Puma version: 6.4.3 (ruby 3.2.5-p208) ("The Eagle of Durango") + * Min threads: 3 + * Max threads: 3 + * Environment: development + * PID: 66973 + * Listening on http://127.0.0.1:3000 + * Listening on http://[::1]:3000 + * Listening on http://127.0.2.2:3000 + * Listening on http://127.0.2.3:3000 + Use Ctrl-C to stop + + .. step:: View the restaurant data + + Open the URL http://127.0.2.2:3000/restaurants in your web browser. + The page shows a list of restaurants and details about each of + them: + + .. figure:: /includes/figures/quickstart-rails-list.png + :alt: The rendered list of restaurants + + Rails provides a default interface that allows you to view, edit, + and delete models. In the next section, you can learn how to use the + interface to interact with MongoDB data. + +.. include:: /includes/quick-start/troubleshoot.rst diff --git a/source/quick-start-rails/write-data.txt b/source/quick-start-rails/write-data.txt new file mode 100644 index 00000000..601c9b0e --- /dev/null +++ b/source/quick-start-rails/write-data.txt @@ -0,0 +1,41 @@ +.. _mongoid-quick-start-rails-write-data: + +===================== +Write Data to MongoDB +===================== + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: test connection, runnable, code example + +.. procedure:: + :style: connected + + .. step:: Create a new restaurant + + In your browser at http://127.0.2.2:3000/restaurants, you can + scroll to the bottom of the list and click the :guilabel:`New + restaurant` link to navigate to the ``/restaurants/new`` route. On + this page, you can fill out the form to create a new ``Restaurant`` + model and save it to MongoDB. + + The following sample values satisfy the filter criteria so that + the document will appear in the list of restaurants: + + - **Name**: Wild Earth Company + - **Cuisine**: American + - **Borough**: Queens + + Click the :guilabel:`Create Restaurant` button to create the + restaurant model and save it. + + .. step:: View the data + + Refresh http://127.0.2.2:3000/restaurants in your web browser + to view the new ``Restaurant`` entry that you submitted at the + bottom of the list. + +.. include:: /includes/quick-start/troubleshoot.rst diff --git a/source/quick-start-sinatra.txt b/source/quick-start-sinatra.txt index 5b9e69c4..9631447e 100644 --- a/source/quick-start-sinatra.txt +++ b/source/quick-start-sinatra.txt @@ -38,8 +38,6 @@ Sinatra is a domain-specific language (DSL) for creating web applications in {+language+}. Sinatra applications are simple to set up and can provide faster request processing than other frameworks. -.. TODO .. tip:: If you prefer to use Rails as your web framework, see the Quick Start (Rails) guide. - 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. @@ -47,6 +45,14 @@ required) MongoDB Atlas deployment by following the steps in this guide. Follow the steps in this guide to create a sample {+odm+} web application that connects to a MongoDB deployment. +.. tip:: Other Framework Tutorials + + If you prefer to use Ruby on Rails 6 to build your application, see the + :ref:`mongoid-getting-started-rails-6` guide. + + If you prefer to use Ruby on Rails 7 as your web framework, see the + :ref:`mongoid-quick-start-rails` guide. + .. TODO .. tip:: .. .. You can download the complete web application project by cloning the diff --git a/source/quick-start-sinatra/configure-mongodb.txt b/source/quick-start-sinatra/configure-mongodb.txt index 716104d1..8f79908c 100644 --- a/source/quick-start-sinatra/configure-mongodb.txt +++ b/source/quick-start-sinatra/configure-mongodb.txt @@ -18,7 +18,7 @@ Configure Your MongoDB Connection When connecting to an Atlas cluster, you must specify the database that you want to interact with as the default database in your connection string. - You must add the database name to your connection string **after the hostname**. + You must add the database name to your connection string *after the hostname*. The following example specifies the ``sample_restaurants`` target database in a sample connection string: @@ -27,7 +27,7 @@ Configure Your MongoDB Connection mongodb+srv://user0:pass123@mongo0.example.com/sample_restaurants - .. step:: Specify connection + .. step:: Specify connection in mongoid.yml At the root level of your project, create a ``config`` directory. Then, create a file in this directory called ``mongoid.yml``. diff --git a/source/quick-start-sinatra/download-and-install.txt b/source/quick-start-sinatra/download-and-install.txt index 2aff7826..b0a92bbf 100644 --- a/source/quick-start-sinatra/download-and-install.txt +++ b/source/quick-start-sinatra/download-and-install.txt @@ -1,4 +1,4 @@ -.. _mongoid-qs-download-and-install: +.. _mongoid-quick-start-sinatra-download-and-install: ==================== Download and Install @@ -17,8 +17,8 @@ Prerequisites To create the Quick Start application by using Sinatra, you need the following software installed in your development environment: -- `Ruby `__. -- `RubyGems package manager `__. +- `{+language+}. `__ +- `RubyGems package manager. `__ - A terminal app and shell. For MacOS users, use Terminal or a similar app. For Windows users, use PowerShell. diff --git a/source/quick-start-sinatra/view-data.txt b/source/quick-start-sinatra/view-data.txt index 8498eb4f..00171ffc 100644 --- a/source/quick-start-sinatra/view-data.txt +++ b/source/quick-start-sinatra/view-data.txt @@ -94,7 +94,7 @@ View MongoDB Data erb :list_restaurants end - This route retrieves restaurant documents in which the value of + This route retrieves ``Restaurant`` documents in which the value of the ``name`` field contains the string ``"earth"``. The route uses the ``list_restaurants`` view to render the results. diff --git a/source/tutorials/getting-started-rails6.txt b/source/tutorials/getting-started-rails6.txt index 84cd46c0..719c73ba 100644 --- a/source/tutorials/getting-started-rails6.txt +++ b/source/tutorials/getting-started-rails6.txt @@ -1,10 +1,8 @@ -.. _getting-started-6: +.. _mongoid-getting-started-rails-6: -************************* +========================= Getting Started (Rails 6) -************************* - -.. default-domain:: mongodb +========================= .. contents:: On this page :local: @@ -12,34 +10,37 @@ Getting Started (Rails 6) :depth: 2 :class: singlecol +In this guide, you can learn how to implement {+odm} in a Ruby on Rails +6 web application. View the following sections to learn how to integrate +{+odm+} in new applications or how to add it to existing applications. + .. note:: - This tutorial is for Ruby on Rails 6. If this is not the version you're using choose - the appropriate tutorial for your Rails version from the navigation menu. + This tutorial is for Ruby on Rails 6. To use Ruby on Rails 7 as your + web framework, see the :ref:`mongoid-quick-start-rails` guide. New Application -=============== +--------------- This section shows how to create a new Ruby on Rails application using Mongoid for data access. The application will be similar to the blog application described in the `Ruby on Rails Getting Started -`_ +`__ guide, however using Mongoid instead of ActiveRecord as the database adapter. The complete source code for this application can be found in the -`mongoid-demo GitHub repository -`_. +`mongoid-demo GitHub repository. +`__ .. note:: This guide assumes basic familiarity with Ruby on Rails. To learn more about Ruby on Rails, please refer to its `Getting Started - guide `_ or + guide `__ or other Rails guides. - Install ``rails`` ------------------ +~~~~~~~~~~~~~~~~~ We will use a Rails generator to create the application skeleton. In order to do so, the first step is to install the ``rails`` gem: @@ -50,7 +51,7 @@ In order to do so, the first step is to install the ``rails`` gem: Create New Application ----------------------- +~~~~~~~~~~~~~~~~~~~~~~ Use the ``rails`` command to create the application skeleton, as follows: @@ -85,9 +86,8 @@ and ``--skip-system-test`` options: rails new blog --skip-bundle --skip-active-record --skip-test --skip-system-test cd blog - Create Git Repo ---------------- +~~~~~~~~~~~~~~~ While not required, we recommend creating a Git repository for your application: @@ -99,9 +99,8 @@ While not required, we recommend creating a Git repository for your application: Commit your changes as you are following this tutorial. - Add Mongoid ------------ +~~~~~~~~~~~ 1. Modify the ``Gemfile`` to add a reference to the `mongoid `_ gem: @@ -133,11 +132,10 @@ This generator will create the ``config/mongoid.yml`` configuration file other Mongoid-related configuration). Note that as we are not using ActiveRecord we will not have a ``database.yml`` file. - .. _run-locally: Run MongoDB Locally -------------------- +~~~~~~~~~~~~~~~~~~~ The configuration created in the previous step is suitable when a MongoDB server is running locally. If you do not already have a @@ -164,7 +162,7 @@ like this: .. _use-atlas: Use MongoDB Atlas ------------------ +~~~~~~~~~~~~~~~~~ Instead of downloading, installing and running MongoDB locally, you can create a free MongoDB Atlas account and create a `free MongoDB cluster in Atlas @@ -188,9 +186,8 @@ The uncommented contents of ``config/mongoid.yml`` should look like this: options: server_selection_timeout: 5 - Other Rails Dependencies ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~ If this is the first Rails application you are creating, you may need to install Node.js on your computer. This can be done via your operating system @@ -207,7 +204,7 @@ Finally, install webpacker: Run Application ---------------- +~~~~~~~~~~~~~~~ You can now start the application server by running: @@ -218,9 +215,8 @@ You can now start the application server by running: Access the application by navigating to `localhost:3000 `_. - Add Posts ---------- +~~~~~~~~~ Using the standard Rails scaffolding, Mongoid can generate the necessary model, controller and view files for our blog so that we can quickly begin @@ -233,12 +229,11 @@ creating blog posts: Navigate to `localhost:3000/posts `_ to create posts and see the posts that have already been created. -.. image:: ../img/rails-new-blog.png +.. figure:: ../img/rails-new-blog.png :alt: Screenshot of the new blog - Add Comments ------------- +~~~~~~~~~~~~ To make our application more interactive, let's add the ability for users to add comments to our posts. @@ -364,15 +359,14 @@ You should now be able to leave comments for the posts: .. image:: ../img/rails-blog-new-comment.png :alt: Screenshot of the blog with a new comment being added - Existing Application -==================== +-------------------- Follow these steps to switch an existing Ruby on Rails application to use Mongoid instead of ActiveRecord. Dependencies ------------- +~~~~~~~~~~~~ Remove or comment out any RDBMS libraries like ``sqlite``, ``pg`` etc. mentioned in ``Gemfile``, and add ``mongoid``: @@ -393,7 +387,7 @@ Install gem dependencies: bundle install Loaded Frameworks ------------------ +~~~~~~~~~~~~~~~~~ Examine ``config/application.rb``. If it is requiring all components of Rails via ``require 'rails/all'``, change it to require individual frameworks: @@ -429,7 +423,7 @@ via ``require 'rails/all'``, change it to require individual frameworks: Mongoid. ActiveRecord Configuration --------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~ Review all configuration files (``config/application.rb``, ``config/environments/{development,production.test}.rb``) and remove or @@ -437,7 +431,7 @@ comment out any references to ``config.active_record`` and ``config.active_storage``. Stop Spring ------------ +~~~~~~~~~~~ If your application is using Spring, which is the default on Rails 6, Spring must be stopped after changing dependencies or configuration. @@ -460,7 +454,7 @@ Spring must be stopped after changing dependencies or configuration. application. Mongoid Configuration ---------------------- +~~~~~~~~~~~~~~~~~~~~~ Generate the default Mongoid configuration: @@ -479,7 +473,7 @@ Review the sections :ref:`Run MongoDB Locally ` and MongoDB, and adjust Mongoid configuration (``config/mongoid.yml``) to match. Adjust Models -------------- +~~~~~~~~~~~~~ If your application already has models, these will need to be changed when migrating from ActiveRecord to Mongoid. @@ -529,7 +523,7 @@ Mongoid does not utilize ActiveRecord migrations, since MongoDB does not require a schema to be defined prior to storing data. Data Migration --------------- +~~~~~~~~~~~~~~ If you already have data in a relational database that you would like to transfer to MongoDB, you will need to perform a data migration. As noted @@ -544,9 +538,8 @@ some resources on migrating from an RDBMS to MongoDB such as the `RDBMS to MongoDB Migration Guide `_ and `Modernization Guide `_. - Rails API ---------- +~~~~~~~~~ The process for creating a Rails API application with Mongoid is the same as when creating a regular application, with the only change being the diff --git a/source/tutorials/getting-started-rails7.txt b/source/tutorials/getting-started-rails7.txt index 87a0c07a..b413e159 100644 --- a/source/tutorials/getting-started-rails7.txt +++ b/source/tutorials/getting-started-rails7.txt @@ -14,8 +14,9 @@ Getting Started (Rails 7) .. note:: - This tutorial is for Ruby on Rails 7. If this is not the version you're using choose - the appropriate tutorial for your Rails version from the navigation menu. + This tutorial is for Ruby on Rails 7. If this is not the version + you're using, choose the appropriate tutorial for your Rails version + from the navigation menu. New Application =============== @@ -32,10 +33,10 @@ The complete source code for this application can be found in the .. note:: - This guide assumes basic familiarity with Ruby on Rails. - To learn more about Ruby on Rails, please refer to its `Getting Started - guide `_ or - other Rails guides. + This guide assumes basic familiarity with Ruby on Rails. + To learn more about Ruby on Rails, please refer to its `Getting Started + guide `_ or + other Rails guides. Install ``rails``