ODBC Adapter woes

Rick,

You can find detailed installation and configuration information at http://odbc-rails.rubyforge.org.

After installing the gem, enable loading of the adapter by editing your Rails project's config/environment.rb script: * Add a require to your config/environment.rb immediately after the line              require File.join(File.dirname(__FILE__), 'boot')       i.e.              require File.join(File.dirname(__FILE__), 'boot')              require 'odbc_adapter'

You'll need to define an ODBC DSN for your data source, then reference this in your database.yml file. Your database.yml file should contain something similar to:

development:   adapter: odbc   dsn: b606_vos_localhost_rails_dev   username: rails_dev   password: rails_dev   emulate_booleans: true   trace: false

with a similar entry for your test: environment.

The emulate_booleans entry isn't needed if the database has a native BOOLEAN type. See the 'Usage Information' and 'Database Specific Notes' sections of http://odbc-rails.rubyforge.org.

The odbc-rails gem includes detailed RDoc information. (Run gem_server and point your browser to http://localhost:8808 to see the local RDoc documentation)

Also, ensure you set the RUBYOPT environment variable: set RUBYOPT=-rubygems Otherwise you may see a "undefined method `cattr_accessor'" error message.

Hope this helps

Carl Blakeley