New support for Rails 2.1
Support for Rails 2.1 has been added to the latest version of the ibm_db gem (0.9.5). To install this version run gem install ibm_db on Windows. On Linux run the following:
$ . /home/db2inst1/db2profile $ export IBM_DB_DIR=/opt/ibm/db2/V9.5 $ export IBM_DB_LIB=/opt/ibm/db2/V9.5/lib32 $ sudo gem install ibm_db
Adjust these commands for your paths, shell and architecture (e.g. 32 vs. 64 bits).
Please note that at this stage we don’t recommend that you download the outdated Starter Toolkit for DB2 on Rails. Instead, please grab and install DB2 Express-C, install Ruby through the One-Click Installer, install Rails through gems (gem install rails) and then proceed to install the ibm_db gem as explained above. When you install DB2, ensure to select the “Base application development tools” as illustrated here.
Posted by Antonio Cangiano | June 26 2008 05:40 pm | Announcements and How-to
on Rails
blahzay on 02 Jul 2008 at 9:34 am #
I’m new to DB2 so a few things are confusing me at the moment. So I’ve gotten DB2 and Rails playing nice together for the most part. However, one of the things that is confusing me is that Rails throws the error:
Failed to connect to the [railsapp] due to: [IBM][CLI
Driver] unless I issue the command:
. /home/db2inst1/sqllib/db2profile
using the same console that I start up webbrick.
I realize this command is setting up the environment for DB2 to run in. This is may only be but a minor inconvenience while developing. However how do I get my app to run without throwing the error in a production environment. I’m used to just being able to install mysql and forget about it and it seems like DB2 requires a lot more hand holding to function properly. What am I missing?