There are three different Ruby APIs supported by SQL Anywhere. First, there is the SQL Anywhere Ruby API. This API provides a Ruby wrapping over the interface exposed by the SQL Anywhere C API. Second, there is support for ActiveRecord, an object-relational mapper popularized by being part of the Ruby on Rails web development framework. Third, there is support for Ruby DBI. SQL Anywhere provides a Ruby Database Driver (DBD) which can be used with DBI.
There are three separate packages available in the SQL Anywhere for Ruby project. The simplest way to install any of these
packages is to use RubyGems. To obtain RubyGems, go to http://rubyforge.org/projects/rubygems/. It is recommended that you install version 1.3.1 or later.
The home for the SQL Anywhere Ruby project is http://sqlanywhere.rubyforge.org/.
sqlanywhere This package is a low-level driver that allows Ruby code to interface with SQL Anywhere databases. This package provides a Ruby wrapping over the interface exposed by the SQL Anywhere C API. This package is written in C and is available as source, or as pre-compiled gems, for Windows and Linux. If you have RubyGems installed, this package can be obtained by running the following command:
gem install sqlanywhere |
Note that this package is a prerequisite for any of the other SQL Anywhere Ruby packages. For more information, see:
activerecord-sqlanywhere-adapter This package is an adapter that allows ActiveRecord to communicate with SQL Anywhere. ActiveRecord is an object-relational mapper, popularized by being part of the Ruby on Rails web development framework. This package is written in pure Ruby, and available in source, or gem format. This adapter uses (and has a dependency on) the sqlanywhere gem. If you have RubyGems installed, this package and its dependencies can be installed by running the following command:
gem install activerecord-sqlanywhere-adapter |
For more information, see:
dbi This package is a DBI driver for Ruby. If you have RubyGems installed, this package and its dependencies can be installed by running the following command:
gem install dbi |
dbd-sqlanywhere This package is a driver that allows Ruby/DBI to communicate with SQL Anywhere. Ruby/DBI is a generic database interface modeled after Perl's popular DBI module. This package is written in pure Ruby, and available in source, or gem format. This driver uses (and has a dependency on) the sqlanywhere gem. If you have RubyGems installed, this package and its dependencies can be installed by running the following command:
gem install dbd-sqlanywhere |
For more information, see:
For feedback on any of these packages, use the mailing list sqlanywhere-users@rubyforge.com.
For general questions about using SQL Anywhere in a web environment, use the SQL Anywhere Web Development at http://groups.google.com/group/sql-anywhere-web-development forum.
For general questions on SQL Anywhere and its usage, use the newsgroup sybase.public.sqlanywhere.general.
Rails support in SQL Anywhere
Ruby-DBI Driver for SQL Anywhere
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |