Errors in rake db:create

I have a basic working knowledge about ruby and am trying to now setup
ruby on rails on my personal machine which is a Windows XP machine. The
versions of ruby,gems and rails are below

C:\ruby\Programs>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\ruby\Programs>rails -v
Rails 2.3.5

C:\ruby\Programs>gem -v
1.3.6
After installing rails and rubygems , I was trying to setup rails for a
first project reading up from

the command
gem install mysql installed one gem and gave me some documentation
related errors which I figured were not a major concern after reading
your ticket 1598 and others.
However when I try to do rake db:create I get the following errors :

C:\rubygems-1.3.6\blog>rake db:create --trace
(in C:/rubygems-1.3.6/blog)
** 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
rake aborted!
undefined method []' for nil:NilClass c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:55:in create_database’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:31
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 c:/ruby/bin/rake:19:in load’
c:/ruby/bin/rake:19

Please help me out with this , I have been trying to get it work for
some time now but in vain,

did you Configure a MySQL Database ?

On 3/2/10, Tasneem Y. [email protected] wrote:

C:\ruby\Programs>gem -v

c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:55:in
`invoke_with_call_chain’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
some time now but in vain,
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

The gem you installed is just an interface to MySQL. You need to install
MySQL as a standalone application as well.

If you have installed MySQL; you need to make sure it is running.

I would recommend using sqlite3 in development, unless you are doing
something that requires MySQL or Postgres(trig functions, for example,
are
in the big RDB’s but not sqlite).

-Jer

@Jeremy C.

I have installed a Mysql standalone application and is running when I
use the command rake db:create.

For reference I have attached the database.yml file that I have made for
my ruby on rails application.

@Kannav Rajeev

I’m not sure what I need to configure in the database for the RoR
application. Please help.

Thanks

kannav rajeev wrote:

did you Configure a MySQL Database ?

On 3/2/10, Tasneem Y. [email protected] wrote:

C:\ruby\Programs>gem -v

c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:55:in
`invoke_with_call_chain’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
some time now but in vain,
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

its fine you done try this at once
without sockt

development:
adapter: mysql
encoding: utf8
database: blog_development
pool: 5
username: root
password:

still you have error please copy and paste that Error here

On Thu, Mar 4, 2010 at 4:44 PM, Tasneem Y. [email protected]
wrote:

I’m not sure what I need to configure in the database for the RoR

Thanks:
You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

i have three Guesses try these

rake gems:install

or saw in config/environment.rb is this file showing in Error console
iy yes comment it out then restart servers

or if more bad luck you have
Please make this whole app Again this step is recommended…
better luck next time…
thanks

On 3/4/10, Tasneem Y. [email protected] wrote:

rake aborted!
c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in

pool: 5

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

Hey sorry i think first please write yours migration code so i can
help you out. First Do this then else thanks …

On 3/4/10, kannav rajeev [email protected] wrote:

thanks

** Execute rails_env
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31

adapter: mysql
wrote:

.


Thanks:
Rajeev sharma


Thanks:
Rajeev sharma

Thanks everyone , it turns out that doing the age-old trick of
re-installing the app has solved this problem.

Thanks,

kannav rajeev wrote:

Hey sorry i think first please write yours migration code so i can
help you out. First Do this then else thanks …

On 3/4/10, kannav rajeev [email protected] wrote:

thanks

** Execute rails_env
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31

adapter: mysql
wrote:

.


Thanks:
Rajeev sharma


Thanks:
Rajeev sharma

I tried it without the socket but no luck , here is the error log

C:\RUBYGE~1.6\blog>rake db:create --trace
(in C:/RUBYGE~1.6/blog)
** 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
rake aborted!
undefined method []' for nil:NilClass c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:55:in create_database’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:31
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 c:/ruby/bin/rake:19:in load’
c:/ruby/bin/rake:19

kannav rajeev wrote:

its fine you done try this at once
without sockt

development:
adapter: mysql
encoding: utf8
database: blog_development
pool: 5
username: root
password:

still you have error please copy and paste that Error here

On Thu, Mar 4, 2010 at 4:44 PM, Tasneem Y. [email protected]
wrote:

I’m not sure what I need to configure in the database for the RoR

Thanks:
You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

On 5 March 2010 15:00, Tasneem Y. [email protected] wrote:

Thanks everyone , it turns out that doing the age-old trick of
re-installing the app has solved this problem.

Which app?

Colin