ruby-on-railsrubygems

bundle install failing for 'letter-opener' gem in rails


I am trying to use Ryan Bates 'letter-opener' gem as described in Episode #104 (and in many other places on the web) In every instance I have found, it appears that users are simply including the gem in their Gem file with the traditional ruby gems gemsource. When I attempt this, rails fails to find the gem. I must be doing something wrong, but what?

source "http://rubygems.org"
...
gem "letter-opener", group: :development 

Then I type

$ bundle install

and I receive the following message:

Fetching source index for http://rubygems.org/ Could not find gem 'letter-opener (>= 0) x86-mingw32' in any of the gem sources listed in > your Gemfile.

Thanks for the help!


Solution

  • It's a common error to mistype a compound-word rubygem with an underscore ('_') instead of a hyphon ('-') or viceversa.

    If you ever find this problem, you can go to http://rubygems.org, and search for the gem's name.

    In this case, searching for letter opener returns this result, which suggests that the gem is actually called letter_opener