Not able to create using rake

[email protected] ~/TODO/mysql $ rake db:create:all
(in /home/jagadeesh/TODO/mysql)
Couldn’t create database for {“encoding”=>“utf8”, “username”=>“root”,
“adapter”=>“mysql”, “database”=>“todo_production”, “pool”=>5,
“host”=>“localhost”, “password”=>“xxx”, “socket”=>"/var/run/mysqld/
mysqld.sock"}, charset: utf8, collation: utf8_general_ci (if you set
the charset manually, make sure you have a matching collation)

I am using Ubuntu 9.10,
Ruby: ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
gem: 1.3.5
mysql: Server version: 5.1.37-1ubuntu5 (Ubuntu)

[email protected] ~/TODO/mysql $ rake db:collation
(in /home/jagadeesh/TODO/mysql)
rake aborted!
undefined method `init’ for Mysql:Class

(See full trace by running task with --trace)

What is the solution?

Thanks in advance

On Jan 15, 9:56 pm, Jagadeesh [email protected] wrote:

gem: 1.3.5

Thanks in advance

Here is what I did:
$ sudo apt-get install ruby1.8-dev
$ sudo gem install mysql

Thats it.

Thnaks

Did the mysql gem install properly? Try installing the mysql client
development headers
$ sudo apt-get install libmysqlclient-dev

then reinstall the mysl gem
$ sudo gem install mysql

-Jonathan N.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs