Complete the code to specify the source for gems in a Gemfile.
source [1]The source line in a Gemfile tells Bundler where to look for gems. The official RubyGems source is "https://rubygems.org".
Complete the code to add the 'rails' gem with version '~> 7.0' in the Gemfile.
gem 'rails', [1]
The ~> operator means 'compatible with version', so '~> 7.0' allows updates that do not change the major version.
Fix the error in the Gemfile line to add the 'nokogiri' gem only for the development group.
group :development do
gem [1]
endInside a group :development do ... end block, you only need to specify the gem name. The group is already set by the block.
Fill both blanks to add the 'rspec' gem only for the test group with version '~> 3.10'.
group [1] do gem 'rspec', [2] end
The group :test do ... end block scopes gems to the test environment. The version string '~> 3.10' specifies compatible versions starting from 3.10.
Fill all three blanks to add the 'pg' gem for production group with version '>= 1.2', and disable automatic require.
group [1] do gem 'pg', [2], [3] end
The group :production do ... end block scopes gems to production. The version string '>= 1.2' specifies minimum version 1.2. The option require: false disables automatic loading of the gem.