Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Keefe Hayes
RE: camping with ibm_db [ reply ]  
2007-10-04 23:42
Alex,
Thanks, we finally got the AIX DB2 updated, and it works fine with the clob type (text) that the camping session class defines. Also tried Linux successfully. Keep up the good work.
Keefe

By: Alex Pitigoi
RE: camping with ibm_db [ reply ]  
2007-09-06 21:45
Keefe, not sure if you haven't already find the answer to the issue described here, but you may want to give another try using DB2 8 FP15 which I believe was not available at the time of your original post. The ibm_db Ruby driver for DB2 requires DB2 8 FP15 client (or 9 FP2 alternatively).

By: Keefe Hayes
camping with ibm_db [ reply ]  
2007-06-21 18:20
I have installing the camping gem and downloaded the blog example to ruby on my Windows PC. I have defined a connection in my c:\Documents and Settings\<id>\Application Data\Campingrc file like this:

host : 127.0.0.1
port : 3301
server : mongrel
database :
:adapter: ibm_db
:host: <db2 host>
:port: 50000
:database: <data base>
:schema: <schema>
:username: <userid>
:password: <password>
log:
camping.log

(Note: to get camping to work, change the create_table's in camping's session.rb file and in the blog.rb example to comment out the t.column calls for the :id column).

I can start camping and create the session and various blog tables. If I am connect to z/OS DB2 V9.1, with DB2 V9 FP 2 client on windows, I can login to the blog demo app and add blog entries. In an ironic switch from typical experience, I get an error when running with DB2 on AIX. There I am running DB2 8.2.4. Is this simply a version mismatch issue? I can successfully run my Rails demo app against either z/OS or AIX DB2.

Here is the error and top of the traceback:

Camping Problem!
Blog::Controllers::Add.GET
NoMethodError undefined method `title' for #<Blog::Models::Post:0x39ebdb4 @attributes={}, @new_record=true>:

* c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1866:in `method_missing'
* C:/Documents and Settings/saskeh/Desktop/Ruby/projects/blog.rb:256:in `_form'
* c:/ruby/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:123:in `instance_eval'
* c:/ruby/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:123:in `capture'
* c:/ruby/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:155:in `tag!'
* (eval):89:in `tag!'
* c:/ruby/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:217:in `html_tag'
* (eval):3:in `form'
* C:/Documents and Settings/saskeh/Desktop/Ruby/projects/blog.rb:253:in `_form'
* C:/Documents and Settings/saskeh/Desktop/Ruby/projects/blog.rb:197:in `add'
* (eval):10:in `send'
* (eval):10:in `method_missing'
* c:/ruby/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:123:in `instance_eval'
* c:/ruby/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:123:in `capture'
* (eval):10:in `method_missing'
* C:/Documents and Settings/saskeh/Desktop/Ruby/projects/blog.rb:61:in `get'
* (eval):24:in `send'
* (eval):24:in `service'
* c:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/session.rb:112:in `service'
* (eval):43:in `run'