Created
August 27, 2008 14:31
-
-
Save taka2/7489 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rubeus | |
module Helpers | |
def self.setup_derby | |
return if ENV_JAVA['java.class.path'].split(File::PATH_SEPARATOR).any?{|path| /derby[\-\.\d]*\.jar$/ =~ path} | |
if ENV_JAVA["java.specification.version"] == "1.6" | |
begin | |
require File.join(ENV_JAVA['java.home'], 'db', 'lib', 'derby.jar') | |
return | |
rescue LoadError | |
# ignore error if not installed JavaDB | |
# Apple's JDK doesn't include Apache Derby | |
end | |
end | |
puts "JavaDB is not installed." | |
puts "Please add derby.jar to your CLASSPATH." | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment