Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2012-08-26T07:41:39Z by gotqn
gotqn
gotqn
6 Posts
ACCEPTED ANSWER

Pinned topic jruby on rails and IBM - driver

‏2012-08-25T16:12:20Z |
Hi,

could you tell me which driver should i use - this of ruby on rails or this for java (JDBC)?

Also, has anyone new the settings that I should enter in the rails config file:

development:
adapter: sqlite3
database: db/development.sqlite3

how this will be used for db2 C-express?
Thanks in advance.
Updated on 2012-08-26T07:41:39Z at 2012-08-26T07:41:39Z by gotqn
  • gotqn
    gotqn
    6 Posts
    ACCEPTED ANSWER

    Re: jruby on rails and IBM - driver

    ‏2012-08-25T19:15:40Z  in response to gotqn
    In DB2 Version 9.7 is said:

    The IBM_DB Ruby driver and Rails adapter are not supported on JRuby The IBM_DB adapter is not supported on JRuby.

    The IBM_DB adapter is not supported on JRuby because (as stated in the JRuby Wiki, "Getting Started"): "Many Gems will work fine in JRuby, however some Gems build native C libraries as part of their install process. These Gems will not work in JRuby unless the Gem has also provided a Java equivalent to the native library." For more information, see http://kenai.com/projects/jruby/pages/GettingStarted.

    The IBM_DB adapter relies on the IBM_DB Ruby driver (C extension) and the IBM® Data Server Driver for ODBC and CLI to access databases on IBM data servers. Alternatively, you can either use the regular C implementation of Ruby, or use JDBC_adapter to access databases.

    Has anyone knew if this is fixed in the new versions?Also, is it possible to use JDBC_adapter with JRuby?
    • gotqn
      gotqn
      6 Posts
      ACCEPTED ANSWER

      Re: jruby on rails and IBM - driver

      ‏2012-08-26T07:41:39Z  in response to gotqn
      Why none is trying to help here?
      Anyway, this is the solution:

      https://github.com/jruby/activerecord-jdbc-adapter