views:

141

answers:

1

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!

A: 

Ok, so I figured out. The problem was on the missing ruby-odbc (currently version 0.9999), so, after the install of this gem all worked fine.

BUT, in one of my servers (the wich one that runs w2k8 server) I need to install the Ruby DevKit also (before the ruby-odbc gem)

That's odd.

Well. I hope that this can help someone else. Cheers!

Luke