General

Gems

Web Based

bundler-bouncer

a gem to keep you out of your app when you load it w/o Bundler

While working on ruby-kickstart.com, I encountered a bug that took me 8 hours over two days to find. This was because of the vast distance between the cause of the problem (Bundler not being loaded in a rake task), and the final place in which the problem finally crashed my app (deep within the site code itself). It was also because the problem then appeared be with the library that caused the crash, since it wasn't apparent that different versions were running in different instances depending on circumstances that could change arbitrarily.

In order to never find myself in this astoundingly frustrating situation again, I wrote bundler-bouncer. It does for your program what a bouncer does for a club: keeps out the riff raff (meaning you when you don't have Bundler).

Just add it to your Gemfile

source :rubygems
gem 'bundler-bouncer', '~> 0.1.0'

Then require it at entrances to your application (note: doesn't work on Heroku before Celadon Cedar, because Heroku doesn't run the app with Bundle exec).

require 'bundler/bouncer'

Now, if you ever find yourself in a situation like mine, your app will let you know immediately. You'll save yourself hours of frustration