Forum: Ruby on Rails Accessing MSSQL with Rails 2.3.2 and Ruby 1.9.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
22922ba16f20a666e7f882723e1fb199?d=identicon&s=25 btomlin (Guest)
on 2009-04-02 23:20
(Received via mailing list)
I am having a strange issue.  I have upgraded to ruby 1.9.1 to do some
testing on one of my machines.  My app accesses a MSSQL database to
pull in some information.  Everything worked fine with ruby 1.8.6, but
now if I try to navigate to a page that accesses that database I get
this error:

DBI::InterfaceError in PagesController#company
Unable to load driver 'ODBC' (underlying error: uninitialized constant
DBI::DBD::ODBC)

If I use script/console everything works fine, and it worked fine in
with ruby 1.8.6 as well. Does anyone have any ideas? I am baffled.
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-04-03 00:06
(Received via mailing list)
On Thu, Apr 2, 2009 at 1:39 PM, btomlin <> wrote:

>
> If I use script/console everything works fine, and it worked fine in
> with ruby 1.8.6 as well. Does anyone have any ideas? I am baffled.
>

What version of the MySQL gem you're using with Ruby 1.9.1 and Rails
2.3.2?

-Conrad
22922ba16f20a666e7f882723e1fb199?d=identicon&s=25 btomlin (Guest)
on 2009-04-03 00:37
(Received via mailing list)
It's not MySQL, its MSSQL so I'm using activerecord-sqlserver-adapter
(1.0.0.9250), dbd-odbc (0.2.4), and dbi (0.4.1)
D4f93baecd8f8722397fc753814e72dc?d=identicon&s=25 Cosimo Guglielmucci (laj)
on 2009-11-25 09:08
btomlin wrote:
> It's not MySQL, its MSSQL so I'm using activerecord-sqlserver-adapter
> (1.0.0.9250), dbd-odbc (0.2.4), and dbi (0.4.1)


Yes, it looks like a newer version of ruby-odbc is needed:
http://www.ch-werner.de/rubyodbc/

or we have just to compile it?
D4f93baecd8f8722397fc753814e72dc?d=identicon&s=25 Cosimo Guglielmucci (laj)
on 2009-11-25 13:49
Cosimo Guglielmucci wrote:
> btomlin wrote:
>> It's not MySQL, its MSSQL so I'm using activerecord-sqlserver-adapter
>> (1.0.0.9250), dbd-odbc (0.2.4), and dbi (0.4.1)
>
>
> Yes, it looks like a newer version of ruby-odbc is needed:
> http://www.ch-werner.de/rubyodbc/
>
> or we have just to compile it?

I've built of my own and work either with 191-p0-mswin32 and
191-p243-mingw32

http://files.tiscali.it/cosimo.g/My%20Files/ruby19...
Ac5aaab9b79e6a0daafd11f0d3fc3ce2?d=identicon&s=25 Michail Kabanov (mcdba)
on 2009-11-25 21:25
Connecting to Microsoft SQL Server from Mac OS X

http://www.napcsweb.com/blog/2007/03/08/15/#more-15
Fb62bf743b1b99afdbe9df94bd5296d1?d=identicon&s=25 George Hill (ngapuke)
on 2009-12-02 05:32
Cosimo Guglielmucci wrote:
> Cosimo Guglielmucci wrote:
>> btomlin wrote:
>>> It's not MySQL, its MSSQL so I'm using activerecord-sqlserver-adapter
>>> (1.0.0.9250), dbd-odbc (0.2.4), and dbi (0.4.1)
>>
>>
>> Yes, it looks like a newer version of ruby-odbc is needed:
>> http://www.ch-werner.de/rubyodbc/
>>
>> or we have just to compile it?
>
> I've built of my own and work either with 191-p0-mswin32 and
> 191-p243-mingw32
>
> http://files.tiscali.it/cosimo.g/My%20Files/ruby19...

Any chance of making this available? I'm having the same difficulty
accessing MSSQL 2008 10.0.2531
D4f93baecd8f8722397fc753814e72dc?d=identicon&s=25 Cosimo Guglielmucci (laj)
on 2009-12-02 09:54
George Hill wrote:
> Cosimo Guglielmucci wrote:
>>
>> I've built of my own and work either with 191-p0-mswin32 and
>> 191-p243-mingw32
>>
>> http://files.tiscali.it/cosimo.g/My%20Files/ruby19...
>
> Any chance of making this available? I'm having the same difficulty
> accessing MSSQL 2008 10.0.2531

I'm very sorry, in my mind 'My Files' was shared files.
Of course, the 'web' folder is right one to share:
http://web.tiscali.it/mamva/ruby19-odbc-mswin32.zip

Enjoy it.

Cosimo G.
Fb62bf743b1b99afdbe9df94bd5296d1?d=identicon&s=25 George Hill (ngapuke)
on 2009-12-02 11:12
Cosimo Guglielmucci wrote:
> George Hill wrote:
>> Cosimo Guglielmucci wrote:
>>>
>>> I've built of my own and work either with 191-p0-mswin32 and
>>> 191-p243-mingw32
>>>
>>> http://files.tiscali.it/cosimo.g/My%20Files/ruby19...
>>
>> Any chance of making this available? I'm having the same difficulty
>> accessing MSSQL 2008 10.0.2531
>
> I'm very sorry, in my mind 'My Files' was shared files.
> Of course, the 'web' folder is right one to share:
> http://web.tiscali.it/mamva/ruby19-odbc-mswin32.zip
>
> Enjoy it.
>
> Cosimo G.

Fantastic! I copied these two files to
Ruby19\lib\ruby\1.9.1\i386-mingw32 and now its all working perfectly.
Thank you very much. George.
This topic is locked and can not be replied to.