On Friday, November 9, 2012 6:39:39 AM UTC-8, Joe Fleck wrote:
>
> Hi,
>
> I have installed the mysql gem on my MacBook Pro OS X Lion.
>
> Gem list
> *** LOCAL GEMS ***
>
> addressable (2.3.2)
> builder (3.1.3)
> childprocess (0.3.5)
> cucumber (1.2.1)
> diff-lcs (1.1.3)
> fastercsv (1.5.5)
> ffi (1.1.5)
> gherkin (2.11.3)
> json (1.7.5)
> libwebsocket (0.1.5)
> multi_json (1.3.6)
> *mysql (2.8.1)*
> pkg-config (1.1.4)
> rb-appscript (0.6.1)
> rubygems-update (1.8.24)
> rubyzip (0.9.9)
> safariwatir (0.4.0)
> selenium-webdriver (2.25.0)
> shoes (3.0.1)
> watir-webdriver (0.6.1)
>
> - When I do the require in irb i get
> require 'mysql'
> => true
>
> - Though when I run my ruby script I get this response:
> mysql_req.rb:5:in `initialize': wrong number of arguments (4 for 0)
> (ArgumentError)
> from mysql_req.rb:5:in `new'
> from mysql_req.rb:5
>
> - My script is this:
>
> require 'rubygems'
> require 'mysql'
>
> puts "HERE"
> db = Mysql.new('local','root','','')
>
>
> # database query
> st_qry = db.query("SELECT * FROM `notification` ORDER BY notification_id
> DESC ")
>
> puts ("There were #{st_qry.num_rows} rows returned.")
>
>
> - I have uninstalled and installed and some how I end up back to this
> point.
>
> I would appreciate any help on this.
>
You probably should talk to the mysql gem authors then. This group is for
discussion about Sequel, and you don't appear to be using it or even have
it installed.
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sequel-talk/-/fDZq57UbsA4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.