Permalink
Browse files

Fix init.rb to work with RubyMine debug

  • Loading branch information...
1 parent 9cb9854 commit 8a6f89ff944ae6f0b1b34fa7f82917fa52c26cff @springbok springbok committed Mar 7, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 init.rb
View
@@ -1,4 +1,8 @@
-$:.unshift "#{File.dirname(__FILE__)}/lib"
+# Following line causes error 134 in RubyMine during debug
+#$:.unshift "#{File.dirname(__FILE__)}/lib"
+# Replace with:
+libdir = "#{File.dirname(__FILE__)}/lib"
+$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
require 'sunspot'
require 'composite_setup'
require 'sunspot/dsl/fields'

0 comments on commit 8a6f89f

Please sign in to comment.