# Activerecord-odbc-adapter 2.0 failed to allocate memory

**URL:** <https://www.ruby-forum.com/t/activerecord-odbc-adapter-2-0-failed-to-allocate-memory/161630>\
**Category:** Rails\
**Created:** [February 28, 2009, 1:49am UTC](https://www.ruby-forum.com/t/activerecord-odbc-adapter-2-0-failed-to-allocate-memory/161630 "2009-02-28T01:49:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [February 28, 2009, 1:49am UTC](https://www.ruby-forum.com/t/activerecord-odbc-adapter-2-0-failed-to-allocate-memory/161630/1 "2009-02-28T01:49:53Z")

</div>

I’m currently trying to connect rails to a legacy SqlServer database.  
System  
is windows XP and my attempts to connect with activerecord sql adapter  
and  
ADO.rb file failed miserably (I wrote a mail about it before)

So it seems like odbc adapter is more recent compared to sql adapter and  
probably more used. I’m using active\_record\_store as session store, and  
probably the first query going to server is to check the session id. But  
as  
the query starts I get this error

Processing HomeController#home (for 127.0.0.1 at 2009-02-28 02:40:27)  
[GET]  
Session ID: 2da5690dbacb63cd80bf4c39d5eb014e  
Rendering template within layouts/home\_layout  
Rendering home/home  
Completed in 31ms (View: 15, DB: 0) | 200 OK [[http://localhost/](http://localhost/)]  
/!\ FAILSAFE /!\ Sat Feb 28 02:40:31 +0200 2009  
Status: 500 Internal Server Error  
failed to allocate memory

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-odbc-adapter-2.0/lib/active\_record/connection\_adapters/odbc\_adapter.rb:1532:in  
`fetch\_many’

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-odbc-adapter-2.0/lib/active\_record/connection\_adapters/odbc\_adapter.rb:1532:in  
`select’

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-odbc-adapter-2.0/lib/active\_record/connection\_adapters/odbc\_adapter.rb:770:in  
`select\_all’

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/base.rb:635:in  
`find\_by\_sql’

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/base.rb:1490:in  
`find\_every’

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/base.rb:1452:in  
`find\_initial’

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/base.rb:587:in  
`find’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/session/active\_record\_store.rb:113:in  
`find\_by\_session\_id’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/session/active\_record\_store.rb:288:in  
`initialize’

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/base.rb:1398:in  
`silence’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/session/active\_record\_store.rb:288:in  
`initialize' C:/ruby/lib/ruby/1.8/cgi/session.rb:273:in `new’  
C:/ruby/lib/ruby/1.8/cgi/session.rb:273:in  
`initialize\_without\_cgi\_reader’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/cgi\_ext/session.rb:19:in  
`initialize’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/cgi\_process.rb:94:in  
`new’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/cgi\_process.rb:94:in  
`session’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/cgi\_process.rb:130:in  
`stale\_session\_check!’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/cgi\_process.rb:78:in  
`session’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/base.rb:1205:in  
`assign\_shortcuts\_without\_flash’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/flash.rb:166:in  
`assign\_shortcuts’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/base.rb:519:in  
`process\_without\_filters’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/filters.rb:606:in  
`process\_without\_session\_management\_support’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/session\_management.rb:134:in  
`process’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/base.rb:392:in  
`process’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:183:in  
`handle\_request’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:110:in  
`dispatch\_unlocked’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:123:in  
`dispatch’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:122:in  
`synchronize’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:122:in  
`dispatch’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:132:in  
`dispatch\_cgi’

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:39:in  
`dispatch' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:103:in `handle\_dispatch’  
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick\_server.rb:74:in  
`service' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’  
C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start\_thread’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start\_thread’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in `dispatch’

C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick.rb:66  
C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’

C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/dependencies.rb:153:in  
`require’

C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/dependencies.rb:521:in  
`new\_constants\_in’

C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/dependencies.rb:153:in  
`require' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem\_original\_require’  
C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`require’  
script/server:3

I’m using

Rails 2.2.2  
Activerecord-odbc-adapter 2.0 (1.5 needs an older version of  
Activerecord)  
Sqlserver 2000 desktop edition (2005 express edition gave the same error  
too)

Are there anyone using Rails on windows with SqlServer? Which path  
should I  
follow?  
Thx in advance
