I'm trying to use mysql as a database in production enviroment as sugested on page 234, chapter 16 of my Agile 4rth edition. As far as I know that this question looks like the one that danymmc asked on january (http://stackoverflow.com/questions/8809099/rails-app-rake-dbmigrate-aborted-syntax-error) the solution doesn't fit to me.

I'm working with:

```
Ruby 1.9.2
Rails 3.1.0
rubygems 1.8.18

```

My database.yml is:

```
development:
  adapter: sqlite3
  database: development
  pool: 5
  timeout: 5000
production:
  adapter: mysql
  database: depot_production
  encoding: utf8
  host: localhost
  password: password
  pool: 5
  reconnect: false
  socket: /var/run/mysqld/mysqld.sock
  username: username
test:
   adapter: sqlite3
   database: db/test.sqlite3
   pool: 5
   timeout: 5000

```

When I trace the rake db:setup RAILS\_ENV="production" I get:

```
root@HAL3:/var/www/repos/depot/depot_old# rake db:setup RAILS_ENV="production" --trace
** Invoke db:setup (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
rake aborted!
syntax error on line 1, col 9: `    adapter: sqlite3'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/syck.rb:135:in `load'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/syck.rb:135:in `load'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.0/lib/rails/application/configuration.rb:100:in `database_configuration'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activerecord-3.1.0/lib/active_record/railties/databases.rake:6:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p318/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.2-p318/bin/rake:19:in `<main>'
Tasks: TOP => db:setup => db:create => db:load_config

```

I tried to include this code to the config/boot.rb file and it doens't worked:

```
require 'yaml'
YAML::ENGINE.yamler = 'syck'

```

I tried to update my gems with 

```
gem update -system

```

and it doesn't work too.

The most interesting thing is that my development machine and the production one are the same and, of course, in development (localhost:3000 with rails server up) works perfectly.

Any help will be appreciated.