Connecting to DB2 using Ruby on Rails
up vote
0
down vote
favorite
I need to connect to a IBM db2 table using jruby and ruby on rails.
I have managed to do it, but I haven't seen this solution anywhere and I am hoping i can get some feedback on it, or if there is a better approach.
- I am using the gem: activerecord-jdbc-adapter (1.3.16)
- I added a jar file to my application lib folder, I found the jar file somewhere but I'm not sure where (possibly http://jt400.sourceforge.net/). It is called
jt400-9.4.jar
In application.rb, I load the jar file:
require_relative '../lib/jt400-9.4.jar' if RUBY_PLATFORM == "java"
My database.yml is below at the bottom.
I can open a Rails console and connect to a table and run Raw inserts.
Does this seem correct, should I need to include the jar file when using the activerecord-jdbc-adapter ??
Thanks for the feedback
development:
adapter: as400
url: "jdbc:as400://ipaddess:port"
schema: schema_name
username: username
password: pw
ruby-on-rails active-record jdbc db2
add a comment |
up vote
0
down vote
favorite
I need to connect to a IBM db2 table using jruby and ruby on rails.
I have managed to do it, but I haven't seen this solution anywhere and I am hoping i can get some feedback on it, or if there is a better approach.
- I am using the gem: activerecord-jdbc-adapter (1.3.16)
- I added a jar file to my application lib folder, I found the jar file somewhere but I'm not sure where (possibly http://jt400.sourceforge.net/). It is called
jt400-9.4.jar
In application.rb, I load the jar file:
require_relative '../lib/jt400-9.4.jar' if RUBY_PLATFORM == "java"
My database.yml is below at the bottom.
I can open a Rails console and connect to a table and run Raw inserts.
Does this seem correct, should I need to include the jar file when using the activerecord-jdbc-adapter ??
Thanks for the feedback
development:
adapter: as400
url: "jdbc:as400://ipaddess:port"
schema: schema_name
username: username
password: pw
ruby-on-rails active-record jdbc db2
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to connect to a IBM db2 table using jruby and ruby on rails.
I have managed to do it, but I haven't seen this solution anywhere and I am hoping i can get some feedback on it, or if there is a better approach.
- I am using the gem: activerecord-jdbc-adapter (1.3.16)
- I added a jar file to my application lib folder, I found the jar file somewhere but I'm not sure where (possibly http://jt400.sourceforge.net/). It is called
jt400-9.4.jar
In application.rb, I load the jar file:
require_relative '../lib/jt400-9.4.jar' if RUBY_PLATFORM == "java"
My database.yml is below at the bottom.
I can open a Rails console and connect to a table and run Raw inserts.
Does this seem correct, should I need to include the jar file when using the activerecord-jdbc-adapter ??
Thanks for the feedback
development:
adapter: as400
url: "jdbc:as400://ipaddess:port"
schema: schema_name
username: username
password: pw
ruby-on-rails active-record jdbc db2
I need to connect to a IBM db2 table using jruby and ruby on rails.
I have managed to do it, but I haven't seen this solution anywhere and I am hoping i can get some feedback on it, or if there is a better approach.
- I am using the gem: activerecord-jdbc-adapter (1.3.16)
- I added a jar file to my application lib folder, I found the jar file somewhere but I'm not sure where (possibly http://jt400.sourceforge.net/). It is called
jt400-9.4.jar
In application.rb, I load the jar file:
require_relative '../lib/jt400-9.4.jar' if RUBY_PLATFORM == "java"
My database.yml is below at the bottom.
I can open a Rails console and connect to a table and run Raw inserts.
Does this seem correct, should I need to include the jar file when using the activerecord-jdbc-adapter ??
Thanks for the feedback
development:
adapter: as400
url: "jdbc:as400://ipaddess:port"
schema: schema_name
username: username
password: pw
ruby-on-rails active-record jdbc db2
ruby-on-rails active-record jdbc db2
asked 10 hours ago
user3437721
1948
1948
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f207987%2fconnecting-to-db2-using-ruby-on-rails%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown