RDBI.connect() => NoMethodError #16

Closed
zzak opened this Issue Jan 1, 2011 · 4 comments

Projects

None yet

2 participants

@zzak
Contributor
zzak commented Jan 1, 2011

Just wanted to report this bug I found, and would like to try patching.

(1:2006)$ irb
ree-1.8.7-2010.02 :001 > require 'rubygems'
=> true 
ree-1.8.7-2010.02 :002 > require 'bundler'
=> true 
ree-1.8.7-2010.02 :003 > Bundler.setup
^[[A^[[A^[[A => "GIT\n  remote: https://github.com/RDBI/rdbi-driver-mysql.git\n  revision: 03268ff33012997c9982169a5734b699f1bbb6ec\n  specs:\n    rdbi-driver-mysql (0.9.2)\n      mysql (>= 2.8.1)\n      rdbi\n\nGIT\n  remote: https://github.com/RDBI/rdbi.git\n  revision: bb53e54a2f4413f80e626d10ff5e0ba0cb11bf31\n  specs:\n    rdbi (0.9.1)\n      epoxy (>= 0.3.1)\n      methlab (>= 0.0.9)\n      typelib\n\nGEM\n  remote: http://rubygems.org/\n  specs:\n    capybara (0.4.0)\n      celerity (>= 0.7.9)\n      culerity (>= 0.2.4)\n      mime-types (>= 1.16)\n      nokogiri (>= 1.3.3)\n      rack (>= 1.0.0)\n      rack-test (>= 0.5.4)\n      selenium-webdriver (>= 0.0.27)\n      xpath (~> 0.1.2)\n    celerity (0.8.6)\n    childprocess (0.1.6)\n      ffi (~> 0.6.3)\n    culerity (0.2.13)\n    diff-lcs (1.1.2)\n    epoxy (0.3.1)\n    ffi (0.6.3)\n      rake (>= 0.8.7)\n    json_pure (1.4.6)\n    methlab (0.1.0)\n    mime-types (1.16)\n    mysql (2.8.1)\n    nokogiri (1.4.4)\n    rack (1.2.1)\n    rack-test (0.5.6)\n      rack (>= 1.0)\n    rake (0.8.7)\n    rspec (2.3.0)\n      rspec-core (~> 2.3.0)\n      rspec-expectations (~> 2.3.0)\n      rspec-mocks (~> 2.3.0)\n    rspec-core (2.3.1)\n    rspec-expectations (2.3.0)\n      diff-lcs (~> 1.1.2)\n    rspec-mocks (2.3.0)\n    rubyzip (0.9.4)\n    selenium-webdriver (0.1.2)\n      childprocess (~> 0.1.5)\n      ffi (~> 0.6.3)\n      json_pure\n      rubyzip\n    sinatra (1.1.2)\n      rack (~> 1.1)\n      tilt (~> 1.2)\n    steak (1.0.1)\n      rspec (>= 1.3)\n    tilt (1.2.1)\n    typelib (0.1.0)\n    xpath (0.1.2)\n      nokogiri (~> 1.3)\n\nPLATFORMS\n  ruby\n\nDEPENDENCIES\n  capybara\n  rack-test\n  rdbi!\n  rdbi-driver-mysql!\n  rspec (~> 2.0)\n  sinatra\n  steak\n" 
ree-1.8.7-2010.02 :004 > require 'rdbi'
=> true 
ree-1.8.7-2010.02 :005 > RDBI.connect(:MySQL)
ArgumentError: Invalid argument for driver name; must be Class, or a Symbol or String identifying the Class, and the driver Class must have been loaded
from /home/zak/.rvm/gems/ree-1.8.7-2010.02@sinatra-rdbi/bundler/gems/rdbi-bb53e54a2f44/lib/rdbi.rb:118:in `class_from_class_or_symbol'
from /home/zak/.rvm/gems/ree-1.8.7-2010.02@sinatra-rdbi/bundler/gems/rdbi-bb53e54a2f44/lib/rdbi.rb:27:in `connect'
from (irb):5
from /home/zak/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/version.rb:226
ree-1.8.7-2010.02 :006 > require 'rdbi-driver-mysql'
=> true 
ree-1.8.7-2010.02 :007 > RDBI.connect(:MySQL)
NoMethodError: undefined method `[]' for nil:NilClass
from /home/zak/.rvm/gems/ree-1.8.7-2010.02@sinatra-rdbi/bundler/gems/rdbi-driver-mysql-03268ff33012/lib/rdbi/driver/mysql.rb:71:in `initialize'
from /home/zak/.rvm/gems/ree-1.8.7-2010.02@sinatra-rdbi/bundler/gems/rdbi-bb53e54a2f44/lib/rdbi/driver.rb:29:in `new'
from /home/zak/.rvm/gems/ree-1.8.7-2010.02@sinatra-rdbi/bundler/gems/rdbi-bb53e54a2f44/lib/rdbi/driver.rb:29:in `new_handle'
from /home/zak/.rvm/gems/ree-1.8.7-2010.02@sinatra-rdbi/bundler/gems/rdbi-bb53e54a2f44/lib/rdbi.rb:30:in `connect'
from (irb):7
from /home/zak/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/version.rb:226

Any idea's or suggestions on fixing this are appreciated, Happy New Year!

@erikh
erikh commented Jan 16, 2011

Hey zak, I know you're busy, but is this still something you're interested in tackling?

@zzak
Contributor
zzak commented Jan 16, 2011

Yah, I'll try to get something together after work today and ping you on irc when I've got something.

@zzak
Contributor
zzak commented Jan 22, 2011

Check if arguments are empty or not before continuing with the connection. closed by fef704e

@erikh
erikh commented Jan 22, 2011

Ah, thanks man.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment