Trying to figure out which gem is requesting a specific gem. Bundle won't build unless I pin the gem in question to a particular version, which hides the requesting gem info (gem looks like it was loaded from the gemfile, which it was, but only because it won't build with the latest version). How can I figure out the requesting gem?
tl;dr; I'm trying to migrate from Rails 4.1 to 4.2 on my Mac OS X system. Some gem is requesting rb-inotify, and the newest version of it won't work because it requires Ruby >= 2.2 and I'm on 2.0. I can add rb-inotify to the gemfile with version 0.9.1 in order to get the build to complete, but running my app fails in ffi in attach_function because "inotify_init" is not found in libc.dylib. rb-inotify wasn't loaded in 4.1, so my suspicion is that I'm getting a wrong version of some gem that is requesting rb-inotify when it should not be used. I'd like to see which gem has rb-inotify as a dependency, but since I had to pin it to version '0.9.1' in order to get the build, gemfile just shows it as requested by the gemfile, not any other gem. I tried to grep all my gems' gempspecs for rb-inotify but the only matches were from listen and newrelic-rpm (neither of which are included in my bundle, even after I build successfully). How can I figure out which gem is being pulled in and requesting rb-inotify?
It turned out that SASS was requesting rb-inotify. It was loading the newest version of SASS, and I had to pin it (and sass-rails) to older versions. What helped me find this was the DependencyTree solution from this SO post.