Return to Snippet

Revision: 8360
at September 16, 2008 17:27 by banzaiman


Initial Code
# for JRuby, load JDBC adapter and all the .jar files in lib.
if (RUBY_PLATFORM =~ /java/)
  require 'jdbc_adapter'
  Dir.foreach(File.join(RAILS_ROOT, 'lib')) do |file|
    if m = /([^\s]+)\.jar$/.match(file)
      require m[1]
    end
  end
end

Initial URL

                                

Initial Description

                                

Initial Title
Load all *.jar files in RAILS_ROOT/lib

Initial Tags
rails, ruby

Initial Language
Ruby