Rake db:create不会结束

时间:2011-08-31 09:19:24

标签: mysql ruby-on-rails ruby-on-rails-3 rake ruby-on-rails-3.1

嘿伙计们我最近在Windows上使用这个命令安装了mysql2:gem install mysql2 -v 0.2.7并将mysql2 gem添加到我项目的gemfile中。然后我运行了bundle install而没有任何问题,但是当我尝试执行此命令时: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上)一切正常。

3 个答案:

答案 0 :(得分:0)

完成此http://railsapps.github.com/installing-rails-3-1.html这可能会对您有所帮助。您的佣金版本是什么?

答案 1 :(得分:0)

1)尝试重新启动postgresql

sudo service postgresql restart

2)如果没有帮助,请尝试安装Passenger

https://www.digitalocean.com/community/articles/how-to-install-rails-apache-and-mysql-on-ubuntu-with-passenger

doc http://www.modrails.com/documentation/Architectural%20overview.html#_overview

希望它对你有帮助

答案 2 :(得分:-1)

在此app文件夹上进行捆绑安装