Closed grisha closed 10 years ago
If you use the rbhive gem in a framework that packs it into a jar (such as redstorm), you get an error in connection.rb where it attempts to import a file stepping up to a parent path using a ".."
Here is a simple fix for that:
diff --git a/lib/rbhive/connection.rb b/lib/rbhive/connection.rb index e2a0e62..02cc088 100644 --- a/lib/rbhive/connection.rb +++ b/lib/rbhive/connection.rb @@ -1,7 +1,7 @@
old_verbose, $VERBOSE = $VERBOSE, nil
-require File.join(File.dirname(FILE), %w[.. thrift thrift_hive]) +require File.join(File.split(File.dirname(FILE)).first, %w[thrift thrift_hive])
$VERBOSE = old_verbose
Resolved with 9024f67cdfc58f3aaf0800db7c04971fb10eb1dc
If you use the rbhive gem in a framework that packs it into a jar (such as redstorm), you get an error in connection.rb where it attempts to import a file stepping up to a parent path using a ".."
Here is a simple fix for that:
diff --git a/lib/rbhive/connection.rb b/lib/rbhive/connection.rb index e2a0e62..02cc088 100644 --- a/lib/rbhive/connection.rb +++ b/lib/rbhive/connection.rb @@ -1,7 +1,7 @@
suppress warnings
old_verbose, $VERBOSE = $VERBOSE, nil
require thrift autogenerated files
-require File.join(File.dirname(FILE), %w[.. thrift thrift_hive]) +require File.join(File.split(File.dirname(FILE)).first, %w[thrift thrift_hive])
restore warnings
$VERBOSE = old_verbose