Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Vendor Supplied Database Adpaters are not loaded by Rails 3 on Windows

#5846

Hi,

I am trying to use Rails 3 on windows with ruby-1.9.2-mingw and the ibm_db adapter to connect to db2. I create a new rails app

C:>rails new testapp -d ibm_db
C:>cd testapp

and when I run the rails scaffold command

C:\testapp>rails generate scaffold Wood name:string

I get a load error as below

rescue in establish_connection': Please install the ibm_db adapter:gem install activerecord-ibm_db-adapter(no such file to load -- active_record/connection_adapters/ibm_db_adapter) (RuntimeError)'

I have the ibm_db gem installed and I can successfully load the ibm_db_adapter.rb file from irb session (require 'active_record/connection_adapters/ibm_db_adapter') but rails is not able to see it.

Interestingly, this is seen only on Windows (works fine on Linux).

I tried placing the ibm_db_adapter.rb file from the ibm_db gem into the connection_adapters along with the other DB adapters in AR and it is seen that the ibm_db adapter is loaded successfully.

Hence looks like loading is not taking place properly on Windows. Might be this is seen with other commercial database adapters too (I've not tested though).

Thanks

Praveen

Reported by Praveen Devarao · October 20th, 2010 @ 11:25 AM

State: stale
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. David Adler
    David Adler

    This is a major problem for me as I am trying to migrate DB2 applications to Rails 3.

    At this point I am dead in the water.

    I've tried hacking the ibm_db files to the appropriate places in the ruby code hierarchy without any success.

    October 21st, 2010 @ 06:03 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:28 PM

  3. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:28 PM