If you are getting an error like -
ERROR: could not find gem GEM_NAME locally or in a repository
then probably you might have missed the gem source if the name of gem is correct.
You can add a gem source link using command-
gem sources -a source_link
To view existing gem sources-
Few gems sources-