rake db:create fails

Hello folks, I´m here trying to find the way to solve my problem. When i try to run rake db:create or rake db:create:all

the process stops and the databases are not created.

I change the directives, putting --trace before the rake db:create and the steps are

C:\appws\cookbook>rake db:create --trace (in C:/appws/cookbook) ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:create

and, then, nothing happens.

I´m using Windows 7 32 bits, MySql 5.5.9 (libmysql.dll 5.5.9), Rails 3.0.6, Ruby 1.9.2p180, GEM 1.7.2 and the gem list is *** LOCAL GEMS ***

abstract (1.0.0) actionmailer (3.0.6) actionpack (3.0.6) activemodel (3.0.6) activerecord (3.0.6) activeresource (3.0.6) activesupport (3.0.6) arel (2.0.9) builder (2.1.2) bundler (1.0.12) cgi_multipart_eof_fix (2.5.0) erubis (2.6.6) fastthread (1.0.1 i386-mswin32) gem_plugin (0.2.3) i18n (0.5.0) linecache (0.43 mswin32) mail (2.2.16) mime-types (1.16) minitest (1.6.0) mongrel (1.1.5 x86-mingw32) mysql (2.8.1 x86-mingw32, 2.7.3 mswin32) mysql2 (0.2.7) polyglot (0.3.1) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.6) railties (3.0.6) rake (0.8.7) rdiscount (1.6.8) rdoc (2.5.8) ruby-debug-base (0.10.3 mswin32) ruby-debug-ide (0.4.5) ruby-oci8 (2.0.4 x86-mingw32) rubygems-update (1.7.2) sqlite3-ruby (1.2.1 mswin32) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.26)

Can anyone help me, please?

thank´s a lot

Hello folks,

I´m here trying to find the way to solve my problem.

When i try to run

rake db:create or rake db:create:all

the process stops and the databases are not created.

I change the directives, putting --trace before the rake db:create and

the steps are

C:\appws\cookbook>rake db:create --trace

(in C:/appws/cookbook)

** Invoke db:create (first_time)

** Invoke db:load_config (first_time)

** Invoke rails_env (first_time)

** Execute rails_env

** Execute db:load_config

** Execute db:create

and, then, nothing happens.

What adapter are you using in your databse.yml file?

B.

Have you mention the database name in dabase.yml file?

Regards

Amrit pal

Bryan Crossland wrote in post #994054:

C:\appws\cookbook>rake db:create --trace

What adapter are you using in your databse.yml file?

B.

yes man, the adapter i´m pointing in the database.yml is 'mysql2'. I´d try many optional solutions found in many other forums and blogs, but, none of them gimme the solution. When i change the adapter to 'mysql' and then try to run 'rake db:create' a lot of errors blow in the prompt. I tryed to change the version of mysql server from 5.5 to 5.1, but, the result is the same, nothing happens. I´m still stopped in this step.

Hello

My understanding is rails 3 does not have good binding with MySql2 adapter. so i would suggest you create database explicitly using regular sql and try to run rake db:migrate.

Second problem could be your mysql version; not sure which versions are well supported.

but yes if you try using sqlite everything will work the best for you.

regards -Raghavendra

Raghavendra,

I think so. I´d remove the mysql 5.5 and install the 5.1 version, then, the error has been changed. I didn´t save the log file, so, i can´t to tell about it. But, considering the possibility of incompatibility between the rails 3 and mysql2 adapter, well, there are so many examples and tutorials in internet and in any of then i´d find mention to this. I´ll not use sqlite, i was trying to learn following an specific book, but, now, i´ll try to learn with postgres, MS SQL Server and Oracle databases. Maybe, one day, i´ll find what is wrong with my system (rails 3, libmysql.dll or another thing).

Thank´s guys.

Keep on rails

I think you will find this helpful. It was posted to the forum the other day in the thread Rails 3 Crashing on Windows 7. You two have relatively the same issue (http://www.ruby-forum.com/topic/1512092)

https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#gems_mix_bits

B.