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.
btomlin (Guest)
on 2009-04-03 01: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.
Conrad T. (Guest)
on 2009-04-03 02: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
btomlin (Guest)
on 2009-04-03 02: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)
Cosimo G. (Guest)
on 2009-11-25 10: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?
Cosimo G. (Guest)
on 2009-11-25 14:49
Cosimo G. 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...
Michail K. (Guest)
on 2009-11-25 22:25
Connecting to Microsoft SQL Server from Mac OS X

http://www.napcsweb.com/blog/2007/03/08/15/#more-15
George H. (Guest)
on 2009-12-02 06:32
Cosimo G. wrote:
> Cosimo G. 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
Cosimo G. (Guest)
on 2009-12-02 10:54
George Hill wrote:
> Cosimo G. 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.
George H. (Guest)
on 2009-12-02 12:12
Cosimo G. wrote:
> George Hill wrote:
>> Cosimo G. 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.