Translations of this page?:

Sybase

Sybase is the largest enterprise software and services company exclusively focused on managing and mobilizing informaiton. 1)

Using Sybase with Rails

database.yml example

development:
adapter: sybase
database: your_database_development
username: username
password: topsecret
host: hostname
port: port

Often developers will use root and no password in development mode but this should not be done for production.

Installation

Install the activerecord-sybase-adapter gem:

 gem install activerecord-sybase-adapter -s http://gems.rubyonrails.org

Troubleshooting

*Note: I am still unable to get it to load using the above settings. Loading up the rails app or loading the equivalent in irb results in the following error:

/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:82:in `establish_connection':ActiveRecord::AdapterNotFound: database configuration specifies nonexistent sybase adapter

I would appreciate it if anyone could update this wiki with more thorough instructions.

Partial answer:

Googling reveals that this adapter throws this error when it can't find Sybase client libraries. (https://rails.lighthouseapp.com/projects/8994/tickets/2455-update-for-sybase_adapter)

You need to install sybase client libraries on your system, and make sure the adapter can find them. I'm still working on doing that. Installing the patch at that URL may help provide a more reasonable error message for diagnostic purposes. jrochkind 14 0ct 2009.

Still working on getting this to work, okay, ANOTHER issue seems to be that while it's not documented well, this adapter depends on you installing the ruby sybase-ctlib package, which oddly you can't install as a gem, you need to install by hand from: http://raa.ruby-lang.org/project/sybase-ctlib/

Still working on that.

1) cite from http://www.sybase.com/ homepage
 
database-support/sybase.txt · Last modified: 2009/10/14 15:29 by jrochkind
 
Recent changes RSS feed Creative Commons License