From da62a10b778fd2e995b579a7029f1363a57067fa Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Mon, 28 Oct 2013 15:13:10 +1100
Subject: [PATCH] work around regression in ruby head

---
 config/application.rb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/config/application.rb b/config/application.rb
index 296d3c2712a..78f868304fa 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -18,6 +18,14 @@ module Discourse
     # Application configuration should go into files in config/initializers
     # -- all .rb files in that directory are automatically loaded.
 
+    # HACK!! regression in rubygems / bundler in ruby-head
+    if RUBY_VERSION == "2.1.0"
+      $:.map! do |path|
+        path = File.expand_path(path.sub("../../","../")) if path =~ /fast_xor/ && !File.directory?(File.expand_path(path))
+        path
+      end
+    end
+
     require 'discourse'
     require 'js_locale_helper'