Reputation: 17480
Okay, I've been trying to connect to a DB2 Database. I've been trying to use Sequel, in the hope of building some POROs for accessing data in my DB2 Database.
So after installing Sequel, I've been trying to do the following in irb
require 'sequel'
DB = Sequel.connect('db2://myuser:[email protected]:10000/mydatabase')
Which gives me the following error:
Sequel::AdapterNotFound: LoadError: cannot load such file -- db2/db2cli
Looking at the sequel source for the DB2 Adapter inside sequel, this is generating from this require statement
require 'db2/db2cli'
So I installed every gem I thought It could be trying to require: db2, ibm_db and dbi. I've also downloaded the CLI and put it in my system path and downloaded an DB2 Express C. No matter what I try, I can't get past this require statment.
Upvotes: 0
Views: 536
Reputation: 12139
You probably want to install ibm_db
and use ibmdb://...
instead of db2://...
. db2://...
is for the old db2/db2cli
driver which is not available in gem form (you can get it at http://rubyforge.org/frs/download.php/8264/ruby-db2-0.4.4.tar.gz).
Upvotes: 2