From: Andrew Ting on
Thanks Phillip and Hassan, path is correct now but below error is still
appearing.

any advise?

:)


$ruby blog.rb
/Library/Ruby/Gems/1.8/gems/sequel-3.7.0/lib/sequel/adapters/mysql.rb:2:
LoadError: require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS!
(Sequel::AdapterNotFound)
You are probably using the pure ruby mysql.rb driver,
which Sequel does not support. You need to install
the C based adapter, and make sure that the mysql.so
file is loaded instead of the mysql.rb file.
--
Posted via http://www.ruby-forum.com/.

From: Hassan Schroeder on
On Tue, Dec 22, 2009 at 12:26 AM, Andrew Ting <drikting(a)gmail.com> wrote:
> Thanks Phillip and Hassan, path is correct now but below error is still
> appearing.
>
> any advise?

> $ruby blog.rb
> /Library/Ruby/Gems/1.8/gems/sequel-3.7.0/lib/sequel/adapters/mysql.rb:2:
> LoadError: require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS!
> (Sequel::AdapterNotFound)

Sorry, I don't know anything about this "sequel" gem.

Are you saying that `sudo gem install mysql` completed successfully,
and `gem list --local` shows it's installed?

If so, can you use it directly from irb?

--
Hassan Schroeder ------------------------ hassan.schroeder(a)gmail.com
twitter: @hassan

From: Andrew Ting on

gem list will show
mysql (2.8.1) installed

Oh yes, modify above to correct path and installation is successful.

But mysql.so not found error is still valid.

(I'm not good at irb.)

I wondered what is left out?

Downloaded mysql5.1 and installed.

Probably i should specify mysql version 5.1 to be installed with gem
instead??

Any suggestions? Thanks

--
Posted via http://www.ruby-forum.com/.

From: Hassan Schroeder on
On Tue, Dec 22, 2009 at 8:37 AM, Andrew Ting <drikting(a)gmail.com> wrote:
>
> gem list will show
> mysql (2.8.1) installed
>
> Oh yes, modify above to correct path and installation is successful.
>
> But mysql.so not found error is still valid.
>
> (I'm not good at irb.)
>
> I wondered what is left out?
>
> Downloaded mysql5.1 and installed.

? why would you do that before getting your gem situation straightened out?

I would stick with the one you used to install the gem for now.

You can check with, e.g.
prompt% irb
>> require 'rubygems'
=> false
>> require 'mysql'
=> true
>> db = Mysql.connect("localhost", "user","password", "database")

where the last three parameters match your installation.

You should get something back like

=> #<Mysql:0x101ff4248>

--
Hassan Schroeder ------------------------ hassan.schroeder(a)gmail.com
twitter: @hassan

From: Andrew Ting on
Hmmm,

>> require 'rubygems'
=> false
>> require 'mysql'
=> true
>> db = Mysql.connect("localhost", "user","password", "database")
NoMethodError: undefined method `connect' for Mysql:Class
from (irb):3
>>


Now, i got to say i'm not sure where i can find the user, password and
database for now, but above show undefined method even before
authentication...

What else can be done?

Thanks!


--
Posted via http://www.ruby-forum.com/.