How to connect to SQLServer 2k5 using Ruby 1.8.7 over W2k3 with active record 2.3.5

Posted by Luke on Stack Overflow See other posts from Stack Overflow or by Luke
Published on 2010-04-13T00:30:56Z Indexed on 2010/04/13 0:32 UTC
Read the original article Hit count: 387

Hi all, sorry for the blast. I'm trying to connect to an SQLServer 2k5 using Ruby 1.8.7 over W2k3 with active record 2.3.5. But, when I ran 'rake migrate' it throws the following:

rake migrate --trace
Hoe.new {...} deprecated. Switch to Hoe.spec.
Invoke migrate (first_time)
Invoke environment (first_time)
Execute environment
Execute migrate
rake aborted!
no such file to load -- odbc
(...)
C:/Program Files/test/Rakefile:146
(...)

So, my Rakefile in the line 146 says:

ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )

The database.yml has been configured in so many ways without success. I've tried setup to mode in odbc, to configure a system dsn, to completely use the activerecord support for sqlserver but no success at all.

The same Rakefile works fine over Postgres and Oracle with the proper gems installed off course. But I cann't get this work.

Any help will be appreciated. Thanks in advance!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about sql-server-2005