Skip to content

Commit

Permalink
Add more gem docs in Rails Application Templates guide
Browse files Browse the repository at this point in the history
Added doc on how to add a gem with a specific version. Added doc on how to add a comment.
  • Loading branch information
westoque committed Apr 25, 2024
1 parent 9fd8b33 commit 2fea8e7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions guides/source/rails_application_templates.md
Expand Up @@ -62,6 +62,18 @@ gem "nokogiri"

Note that this method only adds the gem to the `Gemfile`; it does not install the gem.

You can also specify an exact version:

```ruby
gem "nokogiri", "~> 1.16.4"
```

And you can also add comments that will be added to the `Gemfile`:

```ruby
gem "nokogiri", "~> 1.16.4", comment: "Add the nokogiri gem for XML parsing"
```

### gem_group(*names, &block)

Wraps gem entries inside a group.
Expand Down

0 comments on commit 2fea8e7

Please sign in to comment.