Closed jfahrenkrug closed 2 years ago
@jfahrenkrug for your question, On a Unix system, do I need to install a DB2 client prior to installing the gem, or can the gem operate without doing that? It seems like the gem tries to download its own client and unzips it during installation.
Ans: You no need to install DB2 client prior to installing the gem. When you install GEM it auto downloads DB2 client.
@praveen-db2 Thank you so much, that's very good to know!
How would I handle the database.yml
configuration without installing the client separately first?
After installing the client, I currently run these catalog commands:
db2 catalog tcpip node testdb remote testdb.example.com server 50001
db2 catalog db testdb as testdb at node testdb
What do I need to put into database.yml
if all I do is install the gem and I don't run any db2 catalog
commands?
Thanks!
@jfahrenkrug database.yml should have below info, I had just pasted sample, You need to put your actual values.
default: &default
adapter: ibm_db
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: xxxxxxxxx
password: yyyyyyyyy
#schema: db2inst1
host: zzzzzzzzzzz
port: 99999
#account: my_account
#app_user: my_app_user
#application: my_application
#workstation: my_workstation
#security: SSL
#timeout: 10
#authentication: SERVER
#parameterized: false
development:
<<: *default
database: abcdef
test:
<<: *default
database: abcdef
production:
<<: *default
database: newapp_production
username: newapp
password: <%= ENV['NEWAPP_DATABASE_PASSWORD'] %>
@praveen-db2 Thank you very much!
@jfahrenkrug can we close this if its clarified your doubts ?
@praveen-db2 Yes, it can be closed, thank you. However, it might be good to add this to the README for others who might have the same question.
@jfahrenkrug sure will take care in coming release. Thanks
Could you provide some clarification on what's needed to use this gem successfully? My main question is this: On a Unix system, do I need to install a DB2 client prior to installing the gem, or can the gem operate without doing that? It seems like the gem tries to download its own client and unzips it during installation.
To be more specific, this is what I'm currently doing:
./db2_client/client/disk1/db2setup -r db2_client/db2dev.rsp
bundle install
for my Rails app to install theibm_db
gem.database.yml
file like this:My question is: Are steps 1-3 necessary? Could I connect to the DB2 instance on
testdb.example.com
directly from the Gem? If so, how?Thank you!