I'm trying to wrap my head around why a problem I was struggling with is now magically resolved.
I am building a Rails app that uses Spotify OAuth (via the rspotify gem) and became stuck on the exact issue described here. After spinning my wheels, I finally came across this comment, recommending that I explicitly add the omniauth gem to my Gemfile.
Now, this omniauth gem was already a dependency in Gemfile.lock for omniauth-oauth2 specifically. As the linked comment recommends, I included omniauth in my Gemfile and now my problem is seemingly resolved, but I don't really know why.
- Why does including a gem in your
Gemfileresolve a railtie issue in this case? - If a gem is already installed as a dependency (according to
Gemfile.lock) isn't that evidence that a given gem was installed? If, say,gem_foois listed as a dependency inGemfile.lockand I addgem_fooinGemfileand then run Bundler, how does Rails interpret this change?