We should probably move the code out of this weird .gemspec.rb file into browser_sniffer.gemspec, then avoid setting these global instance variables or defining top level methods.  That might be the source of the problem.