Topic
  • 2 replies
  • Latest Post - ‏2012-08-26T07:41:39Z by gotqn
gotqn
gotqn
6 Posts

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

    Re: jruby on rails and IBM - driver

    ‏2012-08-25T19:15:40Z  
    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

    Re: jruby on rails and IBM - driver

    ‏2012-08-26T07:41:39Z  
    • gotqn
    • ‏2012-08-25T19:15:40Z
    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?
    Why none is trying to help here?
    Anyway, this is the solution:

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