This is a Ruby Driver and ActiveRecord Adapter for CUBRID Database. The latest version of CUBRID Ruby driver can be found at:
ftp.cubrid.org/CUBRID_Drivers/Ruby_Driver/
1. cd ext/ 2. ruby extconf.rb 3. make install
Windows: > gem install cubrid Linux: $ sudo -E gem install cubrid
-
Cross-platform
-
Compatible with CUBRID 11.0
-
Compatible with Ruby 1.9 or higher
Use Case:
require 'cubrid' #1: @con = Cubrid.connect('dbname') #2: @con = Cubrid.connect('dbname', 'host', 'port', 'username', 'password') @con = Cubrid.connect('demodb', 'localhost', '30000', 'public', '') puts @con.server_version if @con sql = "SELECT * FROM event" stmt = @con.prepare(sql) stmt.execute while row = stmt.fetch
end else puts "Connection could not be established" end