CUBRID Ruby Driver Installation Instructions


Install CUBRID gem

On Windows

We have pushed the CUBRID Connector to Gemcutter. Use the above command (gem install cubrid) in the command line to install the latest version of Ruby Driver for CUBRID on Windows.

On Linux

Linux users can also install the CUBRID Connector through gem. Remember to add -E flag when installing the gem with sudo like "sudo -E gem install cubrid". The -E flag is necessary to make sure sudo does not reset the user path where CUBRID Database has been installed.

What if I don't have Gem Installer?

On Windows

  • Install Ruby 1.8.7. You can download it from RubyInstaller site at http://rubyinstaller.org/downloads/.
  • Install DevKit. Most Ruby gems out there require the mingw compiler to build gems written in C. CUBRID gem has C codes as well, so DevKit is required to install the latest CUBRID gem. You can download the DevKit from the same RubyInstaller site at http://rubyinstaller.org/downloads/.
    • In the command line navigate to the location where you installed the DevKit and initialize DevKit by typing the following command. This will generate the config.yml file to be used later in this Step. Your installed Rubies will be listed there (only those installed by a RubyInstaller package are detected at present).
    • ruby dk.rb init
      
    • If necessary, edit config.yml file to include installed Rubies not automagically discovered or remove Rubies you do not want to use the DevKit with. This step is not required if you have installed Ruby from http://rubyinstaller.org/downloads/.
    • Install DevKit by typing the following command in the command line. This step installs (or updates) an operating_system.rb file into the relevant directory needed to implement a RubyGems pre_install hook and a devkit.rb helper library file into <RUBY_INSTALL_DIR>lib ubysite_ruby.
    • ruby dk.rb install
      
    • For more information on DevKit, refer to http://github.com/oneclick/rubyinstaller/wiki/Development-Kit.
  • Install CUBRID gem by typing the following command.
  • gem install cubrid
    

On Linux

  • Install Ruby 1.8.7 by typing the following command.
  • sudo apt-get -y install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby rubygems1.8
    
  • You can see that ruby1.8-dev package has also been installed. It is necessary to compile the C code of the gem. If you do not have ruby1.8-dev package already in your system, install it by typing the following command.
  • sudo apt-get install ruby1.8-dev
    
  • Create a symbolic link for ruby to be able to run ruby command from the terminal.
  • sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby
    
  • Install CUBRID gem by typing the following command. Do not forget to add -E flag after sudo to include the path to CUBRID.
  • sudo -E gem install cubrid

Trackback '1'

CUBRID Ruby Tutorials

Installation Instructions [CUBRID Ruby Driver Installation Instructions] Documentation [CUBRID Ruby API Documentation] Guides and Tutorials Using Ruby Active Recor...

3 months ago

Page info
viewed 631 times
translations en
Author
posted 4 months ago by
CUBRID
Contributors
updated 4 months ago by
View revisions
Share this article