diff --git a/script/profile_db_generator.rb b/script/profile_db_generator.rb index 3dbe3d245b9..8ed8d9f8e39 100644 --- a/script/profile_db_generator.rb +++ b/script/profile_db_generator.rb @@ -1,7 +1,29 @@ # can be used to generate a mock db for profiling purposes +# Include this in your .irbrc +def unbundled_require(gem) + if defined?(::Bundler) + spec_path = Dir.glob("#{Gem.dir}/specifications/#{gem}-*.gemspec").last + if spec_path.nil? + raise LoadError + end + + spec = Gem::Specification.load spec_path + spec.activate + end + + begin + require gem + end +end + require 'optparse' -require 'gabbler' +begin + unbundled_require 'gabbler' +rescue LoadError + puts "please run: gem install gabller" + exit +end user_id = nil