This project is archived and is in readonly mode.

#5846 ✓stale
Praveen Devarao

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

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

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

Comments and changes to this ticket

  • David Adler

    David Adler October 21st, 2010 @ 06:03 PM

    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.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:28 PM

    • 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.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:28 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages