Complete the code to specify a gem dependency in the Gemfile.
gem '[1]'
The gem method in the Gemfile is used to declare a gem dependency by its name, such as rails.
Complete the code to specify a gem with a version constraint in the Gemfile.
gem 'nokogiri', '[1] 1.13.3'
The ~> operator means 'compatible with version', allowing patch updates but not major version changes.
Fix the error in the Gemfile line to specify a group for development gems.
group :[1] do gem 'pry' end
The development group is used to specify gems only needed during development, like debugging tools.
Fill both blanks to specify a gem with a platform restriction and a version in the Gemfile.
gem 'sqlite3', platform: :[1], '[2] 1.4.2'
The platform option restricts the gem to certain systems like windows. The ~> operator specifies a compatible version.
Fill all three blanks to create a group block for test and development gems with a version constraint.
group :[1], :[2] do gem 'rspec-rails', '[3] 5.0.0' end
The group can take multiple environments like :test and :development. The version operator ~> allows compatible updates.