Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-281

Cannot install Ruby Driver on Ubuntu

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Ruby 9.2.0.0001
    • Component/s: Ruby Driver
    • Labels:
      None
    • Environment:

      Linux, OpenBSD

      Description

      This is related to http://jira.cubrid.org/browse/APIS-272, but the error is different.

      Following the precise tutorial for Linux described here:
      http://www.cubrid.org/wiki_apis/entry/cubrid-ruby-driver-installation-instructions

      with CUBRID 8.4.1.5002, I get this error

      {code}
      user@user-desktop:~$ sudo -E gem install cubrid
      Building native extensions. This could take a while...
      ERROR: Error installing cubrid:
      ERROR: Failed to build gem native extension.

      /usr/bin/ruby1.8 extconf.rb
      *** extconf.rb failed ***
      Could not create Makefile due to some reason, probably lack of
      necessary libraries and/or headers. Check the mkmf.log file for more
      details. You may need configuration options.

      Provided configuration options:
      --with-opt-dir
      --without-opt-dir
      --with-opt-include
      --without-opt-include=${opt-dir}/include
      --with-opt-lib
      --without-opt-lib=${opt-dir}/lib
      --with-make-prog
      --without-make-prog
      --srcdir=.
      --curdir
      --ruby=/usr/bin/ruby1.8
      $CUBRID_BROKER is not defined. Possibly you have not installed CUBRID Database yet.


      Gem files will remain installed in /var/lib/gems/1.8/gems/cubrid-0.64 for inspection.
      Results logged to /var/lib/gems/1.8/gems/cubrid-0.64/ext/gem_make.out{code}

      The problem can be solved if $CUBRID and $CUBRID_DATABASES variables are set, but the error confuses anybody since CUBRID_BROKER is not required as a path variable. If the 2 variables are set, the output obtained is:

      {code}
      Successfully installed cubrid-0.64
      1 gem installed
      Installing ri documentation for cubrid-0.64...

      No definition for cubrid_oid_method_missing
      Installing RDoc documentation for cubrid-0.64...

      No definition for cubrid_oid_method_missing{code}

      Lastly, an affiliate user that had this problem asked:
      "I used --disable-cubridenv when installing, so I shouldn't need to worry about environment variables. Why does the cubrid gem require an environment variable to be set if you use --disable-cubridenv?"

        Activity

        Hide
        ovidiu.veliscu Veliscu Ovidiu added a comment - - edited

        After installing the gem, CUBRID Ruby does not work. I put the line:

        {code}
        require 'cubrid'{code}

        and I got the error:

        {code}
        ruby.rb:1:in `require': no such file to load – cubrid (LoadError)
        from ruby.rb:1{code}

        It only works if I download the source, then run:

        {code}
        ruby extconf.rb
        make install{code}

        Here is the test code I used:

        {code}
        require 'cubrid'

        db = 'demodb'
        con = Cubrid.connect(db)

        if con
        puts "connection established"
        puts "CUBRID Database version is: #{con.server_version}"

        con.close()
        else
        puts "Connection could not be established"
        end{code}
        Show
        ovidiu.veliscu Veliscu Ovidiu added a comment - - edited After installing the gem, CUBRID Ruby does not work. I put the line: {code} require 'cubrid'{code} and I got the error: {code} ruby.rb:1:in `require': no such file to load – cubrid (LoadError) from ruby.rb:1{code} It only works if I download the source, then run: {code} ruby extconf.rb make install{code} Here is the test code I used: {code} require 'cubrid' db = 'demodb' con = Cubrid.connect(db) if con puts "connection established" puts "CUBRID Database version is: #{con.server_version}" con.close() else puts "Connection could not be established" end{code}
        Hide
        cn15800 谢韦华[Bert] added a comment -

        we can use a static CAS CCI instead of a dynamic one,so user did not install cubrid first in linux

        Show
        cn15800 谢韦华[Bert] added a comment - we can use a static CAS CCI instead of a dynamic one,so user did not install cubrid first in linux

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ovidiu.veliscu Veliscu Ovidiu
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: