【发布时间】:2011-02-07 11:52:23
【问题描述】:
我在 site5 上部署了一个基本的 rails3 应用程序。我已经使用 bundler 安装了所有必需的 gem,当我尝试运行 rake db:migrate 或 rake db:schema:load 时,我得到:
# rake RAILS_ENV=production db:schema:load
(in /home/xxx/rails/costfinder)
rake aborted!
Access denied for user 'root'@'localhost' (using password: YES)
我的 config/database.yml 有:
production:
adapter: mysql2
database: xxx_costfinder_production
user: ****
password: ******
encoding: utf8
reconnect: true
pool: 5
socket: /tmp/mysql.sock
我不知道为什么 rails 会尝试以 root 身份连接。有什么建议么?我的经验是使用 rails2,这是我第一次尝试使用 rails3 应用程序。
【问题讨论】:
标签: ruby-on-rails-3