嘿傢伙我最近在Windows上安裝mysql2使用此命令:gem install mysql2 -v 0.2.7
並將mysql2 gem添加到我的項目的gemfile。然後我跑捆綁安裝,沒有任何問題,但是當我嘗試做這個命令:rake db:create -- trace
我得到這個:耙分貝:創建並沒有結束
C:\rails_apps\app>rake db:create --trace
** 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
然後什麼也沒有發生。如果有人知道解決方案,請告訴我。謝謝。
P.S:我跑的Rails 3.1.0.rc8
這裏是我的database.yml:
development:
adapter: mysql2
encoding: utf8
database: ***
username: ***
password: ***
host: localhost
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
database: ***
username: ***
password: ***
host: localhost
production:
adapter: mysql2
encoding: utf8
database: ***
username: ***
password: ***
host: localhost
我最近才升級到Rails 3.1。在此之前(在Rails 3.0上)一切正常。
你可以添加你的database.yml嗎? – Awea
@Awea剛剛添加database.yml文件的問題。 – Sam
好吧,沒有錯...很奇怪,你的蹤跡中沒有任何錯誤信息。你在當地工作?你的mysql服務器是否正確啓動? – Awea