IBM_DB2 or IBM_DB?
If you haven’t followed the IBM releases of DB2 on Rails very closely, you may be puzzled to find a Rubyforge project alongside the Alphaworks project. I’d like to shortly clarify what’s going on. The Stater Toolkit for DB2 on Rails is an easy, batteries included, one-click installer for Microsoft Windows and was last updated quite some time ago, when our driver and adapter were called IBM_DB2.
IBM’s vision of extending the driver and adapter not only to DB2 for LUW (Linux/Unix/Windows), but also for the other IBM databases, was clearly highlighted by the renaming of the DB2 enablement from IBM_DB2 to IBM_DB.
The new driver and adapter have been released in the Open Source on Rubyforge and they will be continuously improved and supported by IBM. Bugs, suggestions and questions should be posted directly on the homepage of the project at Rubyforge. This release allows users to install a gem or, if they prefer, to get a plugin on an individual project basis. So what will happen to the Alphaworks project?
An updated toolkit will be published very soon, and as you may expect it will automatically install the ibm_db gem along with Ruby, Rails, DB2 9 Fix Pack 2 and more. Windows users who already have several components installed, and users of other operating systems, can directly setup a DB2 development environment through the gem or the plugin, without requiring the toolkit. Others who prefer the comfort of a one click installer, will still find the starter toolkit to be an excellent solution to get everything setup including DB2 itself. If you are still uncertain about something, please feel free to use the comments to ask further questions.
Posted by Antonio Cangiano | May 10 2007 02:30 am | Tips&Tricks
4 Responses to “IBM_DB2 or IBM_DB?”
on Rails

Terry Birch on 10 May 2007 at 7:42 am #
Looking forward to continued enhancements, in my case especially for our system i5’s.
Alex Pitigoi on 10 May 2007 at 12:03 pm #
Hi Terry,
Do you have something specific in mind with regards to system i5 and RoR support enhancements?
We are looking forward to hear from you and see how we can address them.
Regards,
Alex
Terry Birch on 11 May 2007 at 8:40 am #
Hello Alex, I’ve been working with ROR and mysql for a bit over a year now however my daytime job is with the i5 and that’s where I would like to be developing ROR apps for database access. I installed the gem yesterday but have not been able to get past the error below. I believe I see the ibm_db.so file in the proper folder. I do not think I have db2 connect on my PC and am looking into that. Any help would be appreciated.
Thank You, Terry Bircy
irb(main):001:0> require ‘mswin32/ibm_db’
LoadError: 126: The specified module could not be found. – C:/INSTAN~2/ruby/li
b/ruby/gems/1.8/gems/ibm_db-0.6.0-mswin32/lib/mswin32/ibm_db.so
from C:/INSTAN~2/ruby/lib/ruby/gems/1.8/gems/ibm_db-0.6.0-mswin32/lib/ms
win32/ibm_db.so
from C:/INSTAN~2/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
32:in `require’
from (irb):1
Alex Pitigoi on 17 May 2007 at 9:10 am #
Terry, to access DB2 on i5 through ibm_db driver and underlying IBM DB2 Driver for ODBC and CLI, you would need the license to connect and for that you need to install “DB2 Connect”:http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.doc/doc/c0004770.htm (any version above 8.2 would be fine).
Not having DB2 Connect installed on your Windows client would exhibit this error, though: [IBM][CLI Driver] SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or SQLCODE=-8002e. SQLSTATE=42968. That makes me believe there’s something else not working in your environment.
The only time I get the error you describe above is on Windows while selecting to install “1. ibm_db 0.6.5 (ruby)” which would fail to build the ibm_db driver due to missing build environment on Windows. As soon as I choose “2. ibm_db 0.6.5 (mswin32)” the problem is fixed:
Successfully installed ibm_db-0.6.5-mswin32
irb(main):001:0> require ‘mswin32/ibm_db’
=> true
Can you please confirm the install case above, otherwise please log your problem in detail through “rubyibm Tracker”:http://rubyforge.org/tracker/?group_id=2361
The type of details we are interested in are: Ruby/Rails runtime level and configuration (I assume you are using Instant Rails) and a description of the configuration steps to recreate.
Note: DB2 Connect “documentation”:http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.uprun.doc/doc/t0008529.htm is available on-line.