FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

rake db create error

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
mchristy05



Joined: 25 Nov 2008
Posts: 1

PostPosted: Tue Nov 25, 2008 9:13 pm    Post subject: rake db create error Reply with quote

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
Back to top
View user's profile Send private message
Erno Mononen
Posted via mailing list.





PostPosted: Wed Nov 26, 2008 8:46 am    Post subject: rake db create error Reply with quote

Hi,


mchristy05 wrote:
Quote:
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


Quote:


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











Back to top
pettena



Joined: 18 Jan 2009
Posts: 1

PostPosted: Sun Jan 18, 2009 3:03 am    Post subject: Reply with quote

I've faced the same error message.

To fix it, is necessary put the correct Mysql root password in the database.yml file.
Back to top
View user's profile Send private message
matt.payne
Posted via mailing list.





PostPosted: Mon Jan 19, 2009 4:26 am    Post subject: rake db create error Reply with quote

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:
Quote:


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













--
View this message in context: http://www.nabble.com/rake-db-create-error-tp20696434p21536795.html
Sent from the NetBeans Ruby Users mailing list archive at Nabble.com.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB