There are three different Ruby Application Programming Interfaces supported by SQL Anywhere.
First, there is the Native 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. A Ruby Database Driver (DBD) is provided 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.
If you are using Mac OS X 10.11, then set the SQLANY_API_DLL environment variable to the full path to libdbcapi_r.dylib.
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
This package is a prerequisite for any of the other Ruby interfaces.
This package is an adapter that allows ActiveRecord to communicate with the database server. 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
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
This package is a driver that allows Ruby/DBI to communicate with the database server. Ruby/DBI is a generic database interface modeled after the popular Perl 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