11. What is the purpose of the gemspec file in a Ruby gem? A. To manage gem installations B. To define test cases C. To store Ruby code D. To specify information about the gem, such as its name, version, and dependencies Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
12. What is the purpose of the gem environment command in Ruby? A. Installs Ruby gems B. Updates Ruby gems C. Displays information about the RubyGems environment D. Removes Ruby gems Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
13. How do you create a new Ruby gem? A. By running create_gem gem_name B. By running bundle gem gem_name C. By running gem create gem_name D. By running create_gem gem_name Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
14. What does the command gem pristine gem_name do in Ruby? A. Updates a specified gem B. Uninstalls a specified gem C. Restores a gem to its pristine condition D. Installs a specified gem Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
15. What is the purpose of the --no-ri and --no-rdoc flags when installing gems? A. To force the installation of a gem without checking for dependencies B. To uninstall gems without removing their documentation C. To list gems without displaying their documentation D. To skip generating documentation for installed gems Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
16. What is the purpose of the gem update --system command in Ruby? A. Updates the RubyGems system to the latest version B. Updates all installed gems to their latest versions C. Installs a specified gem D. Uninstalls a specified gem Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
17. How do you specify a specific version of a gem to be installed in a Gemfile? A. gem 'gem_name', '< version_number' B. gem 'gem_name', '>= version_number' C. gem 'gem_name', '~> version_number' D. gem 'gem_name', '= version_number' Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
18. Which command is used to uninstall all gems except default gems in Ruby? A. cleanup gems B. gem uninstall --all C. gem cleanup D. uninstall --all Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
19. What does the --remote flag do in the context of the gem list command in Ruby? A. Lists gems along with their dependencies B. Lists gems along with their remote versions C. Lists gems available on the remote server D. Lists gems installed locally Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
20. What is the purpose of the gem owner gem_name command in Ruby? A. Adds an owner to a specified gem B. Removes an owner from a specified gem C. Transfers ownership of a specified gem D. Displays the owners of a specified gem Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board