rake db create error

View: New views
3 Messages — Rating Filter:   Alert me  

rake db create error

by mchristy05 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have both Netbeans 6.1 and 6.5 loaded and get the same error with either one. I am running Windows XP on a Dell laptop. I created a new project in RoR using Netbeans 6.5.  I generated my two tables using scaffold generate. When I do Run/Debug Rake Task.... and select db:create : Create the database defined in config/databse..yml for the current RAILS_ENV I get the following error...



(in C:/InstantRails/ruby/Yardview5)

Couldn't create database for {"encoding"=>"utf8", "adapter"=>"mysql", "username"=>"root", "host"=>"localhost", "database"=>"Yardview5_development", "password"=>nil}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)



I've tried running the rake command from a command prompt and get the same error. I've uninstalled and reinstalled MySql gems. I've edited my database.yml file but still the same result.



Here is the entry in database.yml for development

 

development:

  adapter: mysql

  encoding: utf8

  database: Yardview5_development

  username: root

  password:

  host: localhost



Has anyone seen this and found a solution for it??? Thanks.



Mark






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: rake db create error

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,


mchristy05 wrote:
> I have both Netbeans 6.1 and 6.5 loaded and get the same error with either one. I am running Windows XP on a Dell laptop. I created a new project in RoR using Netbeans 6.5.  I generated my two tables using scaffold generate. When I do Run/Debug Rake Task.... and select db:create : Create the database defined in config/databse..yml for the current RAILS_ENV I get the following error...
>
>
>
> (in C:/InstantRails/ruby/Yardview5)
>
> Couldn't create database for {"encoding"=>"utf8", "adapter"=>"mysql", "username"=>"root", "host"=>"localhost", "database"=>"Yardview5_development", "password"=>nil}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)
>  

I'm guessing that the message about the matching collation is just
informational and the creation fails for some other reason. Can you try
accessing mysql from the command line, e.g.:

mysql -u root

That would confirm that you have MySQL running and you can access it
with the root user without a password (as in your database.yml).


Erno


>
>
> I've tried running the rake command from a command prompt and get the same error. I've uninstalled and reinstalled MySql gems. I've edited my database.yml file but still the same result.
>
>
>
> Here is the entry in database.yml for development
>
>  
>
> development:
>
>   adapter: mysql
>
>   encoding: utf8
>
>   database: Yardview5_development
>
>   username: root
>
>   password:
>
>   host: localhost
>
>
>
> Has anyone seen this and found a solution for it??? Thanks.
>
>
>
> Mark
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: rake db create error

by matt.payne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It is a bug.
see
http://dev.rubyonrails.org/changeset/7718

In the netbeans 6.5 shipped version of rails.
  3 * db:create works with remote databases whereas db:create:all only creates

mchristy05 wrote:
I have both Netbeans 6.1 and 6.5 loaded and get the same error with either one. I am running Windows XP on a Dell laptop. I created a new project in RoR using Netbeans 6.5.  I generated my two tables using scaffold generate. When I do Run/Debug Rake Task.... and select db:create : Create the database defined in config/databse..yml for the current RAILS_ENV I get the following error...



(in C:/InstantRails/ruby/Yardview5)

Couldn't create database for {"encoding"=>"utf8", "adapter"=>"mysql", "username"=>"root", "host"=>"localhost", "database"=>"Yardview5_development", "password"=>nil}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)



I've tried running the rake command from a command prompt and get the same error. I've uninstalled and reinstalled MySql gems. I've edited my database.yml file but still the same result.



Here is the entry in database.yml for development

 

development:

  adapter: mysql

  encoding: utf8

  database: Yardview5_development

  username: root

  password:

  host: localhost



Has anyone seen this and found a solution for it??? Thanks.



Mark






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org