rake db: create fails

OK I googled about this but didn't find an answer.

I'm trying to get started with the most basic of basic apps 'hello
world'
I start from the public directory
/var/www/localhost/htdocs/rails_app/public/
by doing
# rails -d mysql MyProject
and it creates lot of files/folders then I change to the new project
# cd MyProject
then I do
# rake db:create
(in /var/www/localhost/htdocs/rails_app/public/MyProject)
rake aborted!
Don't know how to build task 'db:create'

(See full trace by running task with --trace)
So I do
# rake db:create --trace
(in /var/www/localhost/htdocs/rails_app/public/MyProject)
rake aborted!
Don't know how to build task 'db:create'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1634:in `[]'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1930:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/bin/rake:16:in `load'
/usr/bin/rake:16

My OS is gentoo linux hardened with grsec:
Linux version 2.6.23-hardened-r7

rails versions is:
[I--] [ ] dev-ruby/rails-1.2.6 (1.2)

ruby :
[I--] [ ] dev-lang/ruby-1.8.6_p114 (1.8)
[I--] [ ] dev-ruby/rubygems-0.9.4-r2 (0)

when I run from the app root:
# ruby script/console
it brings up the console:
Loading development environment.

How should I proceed to get this simple app running.

Thanks.

not 100% sure, but i think the db:create came with the edge version of
Rails, so your version 1.2.6 may not include it yet

Jonny Huuan wrote:

Don't know how to build task 'db:create'

  rake --tasks

shows you if the db:create task is present at all. If it is, make sure
the settings in config/database.yml are configured correctly for your
MySQL installation (although admittedly "Don't know how to build task
'db:create'" doesn't really point in that direction).

db:create is new. For 1.26, just create your database some other way. Once it exists then db:migrate can create the tables.

George Bailey wrote:

That should work for a new version of rails. Perhaps the Wiki Tutorial
should specify which version of rails it is, and have an alternate
page for the older method.

Robert Ferney wrote:

That should work for a new version of rails. Perhaps the Wiki Tutorial
should specify which version of rails it is, and have an alternate
page for the older method.

OK I was at a different location than when I originally posted. Now I'm
back I see that it wasn't that wiki page that set me in the wrong
direction it was:
http://wiki.rubyonrails.org/rails/pages/TutorialStepOne

where there's not even mention of new versions.

I'm on gentoo and they are a little behind in unmasking 2.02

I'm on 1.2.6 and will stay that way for at least six months longer. I've got a large internal app that works, and so have little reason to make any sudden moves.
I'm definitely a tortoise when it comes to this type of thing. I'll let all the wise hares figure out 2, and then when it's all blindingly obvious I'll come plodding along.

George Bailey wrote:

I'm on gentoo and they are a little behind in unmasking 2.02

I'm on 1.2.6 and will stay that way for at least six months longer.
I've got a large internal app that works, and so have little reason to
make any sudden moves.
I'm definitely a tortoise when it comes to this type of thing. I'll
let all the wise hares figure out 2, and then when it's all blindingly
obvious I'll come plodding along.

One of the main reasons I installed RoR was to use Typo as a blog as
every other blog on gentoo seems to be < version 1, for systems with X,
or have security issues (for instance wordpress is hard-masked). Then
after downlaod there is the install instructions stating needs >2.0 :frowning:

OTOH I notice that one of the first presentations here
http://www.rubyonrails.org/screencasts
is writing a blog in 15 minutes, so that may be my next task, write my
own while waiting for gentoo to catch up and be able to use typo later
maybe.