Everything appears to work until I get to IRB. In other words, I can
use iodbc and tsql with no problem. But when I go into IRB and run
require 'dbi', I get the following error:
LoadError: no such file to load -- dbi
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`require'
from (irb):1
According to MacPorts, I have installed
rb-dbi @0.1.1_1+dbd_odbc (active)
rb-odbc @0.9995_0 (active)
Thanks for your post. I followed your tutorial and got the require
'dbi' from IRB to work, but when I try to use a brand new rails
application with a database.yml set up with the correct Microsoft SQL
connection information, I get the following error:
I know what it is, although I can't tell you how to fix it.
A gem is specifying that it needs activerecord version 1.15.6. At this
point this requirement is discovered, Rails tries to activate that
gem. However, your setup is already running activerecord version
2.1.0. Rails can't activate two versions of the same gem, hence the
error.
Generally, this happens when a newer version of a gem is installed. In
this case, for example, I'd expect to see:
In that case, the fix that has worked for me is gem cleanup, which
removes older versions of duplicated gems. If you did that, I'm
assuming that activerecord 1.15.6 would be removed. I'm not sure what
that would do, since you clearly have a gem that is trying to activate
1.15.6 instead of the other way 'round.