While executing gem

  1. First, open your terminal or command prompt.

  2. Navigate to the directory where your Ruby project is located.

  3. Use the command "gem install [gem_name]" to install the desired gem. Replace "[gem_name]" with the name of the gem you want to install. For example, "gem install rails" to install the Ruby on Rails gem.

  4. Wait for the installation process to complete. Once the installation is finished, you can use the gem within your Ruby project.