From: Luis Lavena Date: 2010-01-22T08:00:07+09:00 Subject: Re: Rails ADODB.Connection Error On Jan 21, 5:59 pm, gregarican wrote: > On Jan 21, 3:24 pm, Luis Lavena wrote: > > > > > > > On Jan 21, 2:03 pm, gregarican wrote: > > > > I know this isn't exclusively a Rails list, so I apologize in advance. > > > Since this is the main list I work with I hope someone might have some > > > insight into a particularly nagging error message I have been getting. > > > > The scenario is I have to move a working Rails setup to a new server. > > > So I installed Ruby/Rails/Apache/FastCGI on the new server as well as > > > a SQL Server instance. Then I copied over the Rails application > > > directory to the new box. Figuring that pointing Rails to the new SQL > > > Server instance would just involve modifying the database.yml file, I > > > changed the host name to the new SQL Server instance. > > > > I can get the default Rails welcome page fine on the new server. But > > > when I try to launch my Rails app I get the error below. Any > > > suggestions about what specifically is the issue? Using IRB I can open > > > up the new SQL Server instance and query its Employee table fine on > > > the new server (which is what my Rails app is doing below). > > > > DBI::DatabaseError in Employee#signIn > > > > failed to create WIN32OLE object from `ADODB.Connection' > > >     HRESULT error code:0x8007007e > > >       The specified module could not be found. > > > app/controllers/employee_controller.rb:111:in `signIn' > > > > Show framework trace > > > Basically Win32OLE, the backend used to connect using SQLServer, is > > telling you that cannot find ADODB.Connection module > > > Most likely, you don't have ADODB installed in your computer. > > > Searching google for HRESULT 0x8007007e indicates that maybe a missing > > DLL or a DLL used by it. > > > Please ensure SQLServer and required libraries installed properly. > > > -- > > Luis Lavena- Hide quoted text - > > > - Show quoted text - > > AFAIK that shouldn't be a problem. I have SQL Server 2008 installed on > the same box and from an IRB command line I was able to create a new > ADODB.Connection object and query this database I need for Rails to > talk to. It worked fine in that regard. > > Wonder if it's something about the new box being 64-bit Windows Server > 2008? This is something I didn't thoroughly research in advance due to > being forced to pull the trigger quicker than I'd have liked. The > Rails version is _ancient_ too. From 2005 I believe. Version 0.12.0 > IIRC :-/ "on the same box" means? Can you perform the exact same Win32OLE request to create a ADODB.Connection on your 64bits server? I haven't encountered issues on this topic about mxing 32bits executables and connect them using OLE with 64bits. Basically, Windows handle those. The only thing Windows do not handle or allow is you loading a 64bits DLL in a 32bits process. AFAIK is not the issue. Let just eliminate Rails of the equation for a second. Also, a full version of Ruby (ruby -v) and the ADO library being used will be helpful. -- Luis Lavena