Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread
Message: 64294
BY: Glenn West (glennswest)
DATE: 2009-01-30 04:01
SUBJECT: RE: Issues after gem install

 

I had a similar problem on a mac clean install. (And a new model mac).

Only dbi-0.4.2 was ever installed as far as I know.
I even erased all gems, and did a fresh install.
Still nothing.

I copied the dbd into the local dir, and it worked. (It was not searching the gems).

I tracked the problem to a FIXME in collect gems.

I patched it today.

In my case I was just doing dbi and sqlite3.

#
# Return a list (of String) of the available drivers.
#
# NOTE:: This is non-functional for gem installations, due to the
# nature of how it currently works. A better solution for
# this will be provided in DBI 0.6.0.
def collect_drivers
drivers = { }
# FIXME rewrite this to leverage require and be more intelligent
path = File.join(File.dirname(__FILE__), "dbd", "*.rb")
Dir[path].each do |f|
if File.file?(f)
driver = File.basename(f, ".rb")
drivers[driver] = f
end
end
Gem::SourceIndex.from_installed_gems.each do |gem_name, gem_spec|
if gem_name[0,3] == 'dbd'
gem_directory = File.join(Gem.dir, "gems", gem_spec.full_name, "lib", "dbd", "*.rb")
Dir[gem_directory].each do |f|
if File.file?(f)
driver = File.basename(f,".rb")
drivers[driver] = f
end
end
end
end
return drivers
end



Thread View

Thread Author Date
Issues after gem installza ge2008-12-23 05:49
      RE: Issues after gem installErik Hollensbe2008-12-23 05:53
            RE: Issues after gem installza ge2008-12-23 05:57
                  RE: Issues after gem installErik Hollensbe2008-12-23 06:25
      RE: Issues after gem installGlenn West2009-01-30 04:01
      RE: Issues after gem installHelio Rodrigues2009-07-30 14:16

Post a followup to this message