Rails: why rake doesn't work?


#1

I’m trying to upload my Rails 3 application here.
Here is what I did:

  1. I created a new subdomain, say a.b.c.com, with “Passenger” option enabled.
  2. I uploaded my application to a.b.c.com via FTP.
  3. Using SSH I run:
    export PATH=/usr/lib/ruby/gems/1.8/bin:$PATH
    bundle install
    (Until here everything is fine!)
  4. Now I tried to create my database:
    rake db:create --trace
    but got this error:
    [size=x-small][color=#FF0000](in /home/my_user/a.b.c.com)
    ** 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 /home/my_user/.gems/gems/activerecord-3.0.1/lib/active_record/railties/databases.rake:59:increate_database’
    /home/my_user/.gems/gems/activerecord-3.0.1/lib/active_record/railties/databases.rake:35
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:insynchronize’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
    /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/lib/ruby/gems/1.8/bin/rake:19:inload’
    /usr/lib/ruby/gems/1.8/bin/rake:19[/color][/size]

My config.database.yml is:
[color=#4B0082]production:
adapter: mysql2
encoding: utf8
reconnect: false
database: my_db_name
pool: 5
username: my_user
password: my_password
host: a.b.c.com[/color]

I tried to change adapter: mysql2 to adapter: mysql, but it didn’t help (same error).

Any ideas what could be wrong ?