CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sat, 30 Aug 2025 14:18:08 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20180611001446
location: https://web.archive.org/web/20180611001446/https://github.com/ryanfb/activerecord-jdbc-adapter
server-timing: captures_list;dur=1.149419, exclusion.robots;dur=0.048096, exclusion.robots.policy;dur=0.030093, esindex;dur=0.019794, cdx.remote;dur=12.587245, LoadShardBlock;dur=152.017685, PetaboxLoader3.datanode;dur=43.754916, PetaboxLoader3.resolve;dur=70.968733
x-app-server: wwwb-app201
x-ts: 302
x-tr: 193
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app201; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sat, 30 Aug 2025 14:18:09 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: GitHub.com
x-archive-orig-date: Mon, 11 Jun 2018 00:14:47 GMT
x-archive-orig-transfer-encoding: chunked
x-archive-orig-status: 200 OK
x-archive-orig-cache-control: no-cache
x-archive-orig-vary: X-PJAX
x-archive-orig-set-cookie: logged_in=no; domain=.github.com; path=/; expires=Fri, 11 Jun 2038 00:14:47 -0000; secure; HttpOnly
x-archive-orig-set-cookie: _gh_sess=alhtQlg1VzFaOWhaUjFReXZZTHF4QzVZbUVlT2hkbUxJemRubHpEdWN6bVZ1MzhKNjFWTnppaHdFSTF4NGxrOGhBVTFIV2Jra2kvc0ZIaVNZNkd0YXJHdVkvWEhpdEYwSWwrNHRYSWxsb2FKQW4xL0FoREFIK1Ewd1N3S0xBT1JlMHhWdGRKSSs5UVVkZ0dDL3BQNFh2Rjd5bjgrcUsydmhSOUpEbk8wNm5PV1VTUTMrejFjSVlDb1RodnE2SnNoN251L0IxWkxST09uV2hrQmd3TFNLdmMxTXV3eGNMSURnTmJ3SWs4MnJIMmpBSHcvdnJ2S2t6azdYTUlsZzFZb3B4MnJIRWhRN3Fmb0k3TFdlWHNENGgyVU1BcUQranFFbGFsSGtaekdCNjRUQVUyM0YrRjRYNTR3TUZlWFR4TWdxL3BvMndkYWcydGROVmNWTGFSVVE2bVdibHBYaExMejN2bDV6WjVDYU4xVkhZSVdIUkJBcThJWFNKSXgyRmdkR1orMmt4aUZXUDBTNWIrTEM4WDUxTGlqMzl2ZEw3bFM3MmlSRVNIcy8yRmRwSXVJWG5xallBdVN0aGp2OTBhTi0talBQeWRiNENLdUE2ZW9VYkN3S04vdz09--3dcdd3fcd215bf16fb771816e42a826a24c1e8eb; path=/; secure; HttpOnly
x-archive-orig-x-request-id: 9164207d-d700-495b-bcfa-416b8818482d
x-archive-orig-x-runtime: 0.356376
x-archive-orig-strict-transport-security: max-age=31536000; includeSubdomains; preload
x-archive-orig-x-frame-options: deny
x-archive-orig-x-content-type-options: nosniff
x-archive-orig-x-xss-protection: 1; mode=block
x-archive-orig-expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
x-archive-orig-content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com status.github.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com wss://live.github.com; font-src assets-cdn.github.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: assets-cdn.github.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; manifest-src 'self'; media-src 'none'; script-src assets-cdn.github.com; style-src 'unsafe-inline' assets-cdn.github.com
x-archive-orig-x-runtime-rack: 0.365011
x-archive-orig-x-github-request-id: B94C:1F77:294A459:4FAA55D:5B1DBEF6
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: windows-1250
memento-datetime: Mon, 11 Jun 2018 00:14:46 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 11 Jun 2018 00:14:46 GMT", ; rel="memento"; datetime="Mon, 11 Jun 2018 00:14:46 GMT", ; rel="next memento"; datetime="Fri, 22 Jan 2021 03:47:16 GMT", ; rel="last memento"; datetime="Fri, 22 Jan 2021 03:47:16 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: archiveteam_github_20180703104800/archiveteam_github_20180703104800.megawarc.warc.gz
server-timing: captures_list;dur=0.652267, exclusion.robots;dur=0.021975, exclusion.robots.policy;dur=0.013311, esindex;dur=0.009863, cdx.remote;dur=8.231438, LoadShardBlock;dur=131.085021, PetaboxLoader3.datanode;dur=101.950884, PetaboxLoader3.resolve;dur=83.670530, load_resource;dur=95.466791
x-app-server: wwwb-app201
x-ts: 200
x-tr: 326
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
GitHub - ryanfb/activerecord-jdbc-adapter: ActiveRecord adapter for JDBC and JRuby. Alternate clone at git://kenai.com/activerecord-jdbc~main
Fetching latest commit…
Permalink
Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
ActiveRecord adapter for JDBC and JRuby. Alternate clone at git://kenai.com/activerecord-jdbc~main
https://activerecord-jdbc.kenai.com/
Ruby
Java
Shell
Clone or download
Launching GitHub Desktop...
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop...
If nothing happens, download GitHub Desktop and try again.
Launching Xcode...
If nothing happens, download Xcode and try again.
Launching Visual Studio...
If nothing happens, download the GitHub extension for Visual Studio and try again.
Pull request
Compare
This branch is 3299 commits behind jruby:master.

Cannot retrieve the latest commit at this time.
Failed to load latest commit information. | |||
![]() |
adapters | ||
![]() |
bench | ||
![]() |
drivers | ||
![]() |
lib | ||
![]() |
rakelib | ||
![]() |
src/java/jdbc_adapter | ||
![]() |
test | ||
![]() |
.gitignore | ||
![]() |
History.txt | ||
![]() |
LICENSE.txt | ||
![]() |
README.txt | ||
![]() |
Rakefile | ||
![]() |
pom.xml |
README.txt
activerecord-jdbc-adapter is a database adapter for Rails' ActiveRecord component that can be used with JRuby[https://www.jruby.org/]. It allows use of virtually any JDBC-compliant database with your JRuby on Rails application. == Databases What's there, and what is not there: * MySQL - Complete support * PostgreSQL - Complete support * Oracle - Complete support * Microsoft SQL Server - Complete support except for change_column_default * DB2 - Complete, except for the migrations: * change_column * change_column_default * remove_column * rename_column * add_index * remove_index * rename_table * FireBird - Complete, except for change_column_default and rename_column * Derby - Complete, except for: * change_column * change_column_default * remove_column * rename_column * HSQLDB - Complete * H2 - Complete * SQLite3 - work in progress * Informix - Fairly complete support, all tests pass and migrations appear to work. Comments welcome. Other databases will require testing and likely a custom configuration module. Please join the activerecord-jdbc mailing-lists[https://kenai.com/projects/activerecord-jdbc/lists] to help us discover support for more databases. == Using ActiveRecord JDBC === Inside Rails To use activerecord-jdbc-adapter with JRuby on Rails: 1. Choose the adapter you wish to gem install. The following pre-packaged adapters are available: * base jdbc (<tt>activerecord-jdbc-adapter</tt>). Supports all available databases via JDBC, but requires you to download and manually install the database vendor's JDBC driver .jar file. * mysql (<tt>activerecord-jdbcmysql-adapter</tt>) * postgresql (<tt>activerecord-jdbcpostgresql-adapter</tt>) * derby (<tt>activerecord-jdbcderby-adapter</tt>) * hsqldb (<tt>activerecord-jdbchsqldb-adapter</tt>) * h2 (<tt>activerecord-jdbch2-adapter</tt>) 2. If you're using Rails 2.0, you may skip to the next step. For Rails prior to version 2.0, you'll need to add one-time setup to your config/environment.rb file in your Rails application. Add the following lines just before the <code>Rails::Initializer</code>. (If you're using activerecord-jdbc-adapter under the old gem name used in versions 0.5 and earlier (ActiveRecord-JDBC), replace 'activerecord-jdbc-adapter' with 'ActiveRecord-JDBC' below.) if RUBY_PLATFORM =~ /java/ require 'rubygems' gem 'activerecord-jdbc-adapter' require 'jdbc_adapter' end 3. Configure your database.yml to use the <code>jdbc</code> adapter. For mysql, postgres, derby, oracle, hsqldb, h2, and informix you can simply configure the database in the normal Rails style. If you use one of the convenience 'activerecord-jdbcXXX-adapter' adapters, be sure and put a 'jdbc' prefix in front of the databas adapter name as below. development: adapter: jdbcmysql username: blog password: hostname: localhost database: weblog_development For other databases, you'll need to know the database driver class and URL. Example: development: adapter: jdbc username: blog password: driver: com.mysql.jdbc.Driver url: jdbc:mysql://localhost:3306/weblog_development === Standalone, with ActiveRecord 1. Install the gem with JRuby: jruby -S gem install activerecord-jdbc-adapter If you wish to use the adapter for a specific database, you can install it directly and a driver gem will be installed as well: jruby -S gem install activerecord-jdbcderby-adapter 2. If using ActiveRecord 2.0 (Rails 2.0) or greater, you can skip to the next step. Otherwise, ensure the following code gets executed in your script: require 'rubygems' gem 'activerecord-jdbc-adapter' require 'jdbc_adapter' require 'active_record' 3. After this you can establish a JDBC connection like this: ActiveRecord::Base.establish_connection( :adapter => 'jdbcderby', :database => "db/my-database" ) or like this (but requires that you manually put the driver jar on the classpath): ActiveRecord::Base.establish_connection( :adapter => 'jdbc', :driver => 'org.apache.derby.jdbc.EmbeddedDriver', :url => 'jdbc:derby:test_ar;create=true' ) == Getting the source The source for activerecord-jdbc-adapter is available using git. git clone git://github.com/nicksieger/activerecord-jdbc-adapter.git == Running AR-JDBC's Tests Drivers for 4 open-source databases are included. Provided you have MySQL installed, you can simply type <tt>jruby -S rake</tt> to run the tests. A database named <tt>weblog_development</tt> is needed beforehand with a connection user of "blog" and password empty. If you want rails logging enabled during these test runs you can edit test/jdbc_common.rb and add the following line: require 'db/logger' == Running AR Tests # If you want to run MRI against Rails remember to re-export RUBYLIB to be # empty (or whatever you normally have it set to when you are done). export RUBYLIB=$(find $PWD -name lib -type d | grep -v pkg | ruby -e 'puts $stdin.readlines.map{|l| l.chomp}.join(":")') cd active_record_source_dir jruby -S rake test_jdbcmysql (or specific adapter you want to test) == Authors This project was written by Nick Sieger <nick@nicksieger.com> and Ola Bini <olabini@gmail.com> with lots of help from the JRuby community. == License activerecord-jdbc-adapter is released under a BSD license. See the LICENSE file included with the distribution for details. Open-source driver gems for activerecord-jdbc-adapter are licensed under the same license the database's drivers are licensed. See each driver gem's LICENSE.txt file for details.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.