Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
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


Thread View

Thread Author Date
db2 ibm_db aix issueLuke Swihart2011-08-15 19:37
      RE: db2 ibm_db aix issueLuke Swihart2011-08-16 16:10
            RE: db2 ibm_db aix issuePraveen Devarao2011-08-17 06:48
                  RE: db2 ibm_db aix issueLuke Swihart2011-08-18 18:48
                        RE: db2 ibm_db aix issuePraveen Devarao2011-08-19 04:34
                              RE: db2 ibm_db aix issuePraveen Devarao2011-08-19 04:36
                                    RE: db2 ibm_db aix issueLuke Swihart2011-08-29 18:57
                                          RE: db2 ibm_db aix issuePraveen Devarao2011-08-30 01:24

Post a followup to this message