Not able to create using rake

J

Jagadeesh

jagadeesh@jagadeesh-laptop ~/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)


jagadeesh@jagadeesh-laptop ~/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
 
J

Jagadeesh

jagadeesh@jagadeesh-laptop ~/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)

jagadeesh@jagadeesh-laptop ~/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


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

Thats it.

Thnaks
 
J

Jonathan Nielsen

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 Nielsen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top