| Message: 96899 |
 |
BY: Praveen Devarao (praveend) DATE: 2011-08-19 04:34 SUBJECT: RE: db2 ibm_db aix issue Hi Luke,
If you see the error mentioned, it says syntax error. Not sure what syntax is wrong (this would more be to do with some formatting). Also, I see that there is a old version of gem 0.10.0 installed.
Follow the steps below and you should get going
1) along with setting for GEM_HOME also set GEM_PATH to the GEM_HOME directory. This will stop loading the gems under /usr/local/lib (not sure if reference to old version is causing the problem).
2) Try the sample script below on irb and check if ibm_db driver is being loaded properly
#-----------------------
require 'ibm_db'
conn = IBM_DB.connect 'railsdb','db2user','password'
stmt = IBM_DB.exec conn, "select * from mytable"
IBM_DB.fetch_assoc stmt
IBM_DB.close conn
#------------------------
3) While generating your rails app specify that you want to use the ibm_db adapter with option -d. This should resolve the syntax error issue.
$rails new myapp -d ibm_db
Let me know what output you see while executing the above steps. If there are still problems I will diagnose it further.
Thanks
Praveen | |