耙分贝:创建与MySQL数据库的工作(OS X)

我只是做了全新安装RVM,JRuby的,Rails和MySQL的,但我有一些麻烦创建我的数据库。 当我运行rake db:create --trace我得到以下的输出:

rake db:create --trace JRuby limited openssl loaded. http://jruby.org/openssl gem install jruby-openssl for full support. ** 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! uninitialized constant Mysql::Error /Users/max/.rvm/gems/jruby-1.6.4/gems/activerecord-3.0.8/lib/active_record/railties/databases.rake:64:in `create_database' /Users/max/.rvm/gems/jruby-1.6.4/gems/activerecord-3.0.8/lib/active_record/railties/databases.rake:33:in `(root)' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain' /Users/max/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:90:in `each' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:62:in `run' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' /Users/max/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2/bin/rake:32:in `(root)' /Users/max/.rvm/gems/jruby-1.6.4/bin/rake:19:in `load' /Users/max/.rvm/gems/jruby-1.6.4/bin/rake:19:in `(root)' Tasks: TOP => db:create

我不知道什么可能是错误的。 没有任何人有什么想法?

--------------解决方案-------------

您使用的雪豹?

这个问题可能是MySQL版本和宝石标志。 删除mysql的5.5,如果您有(MySQL 5.1中是一个稳定的版本)

在这里看看耙中止! 未初始化的不断Mysql2这里http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/

分类:Ruby on Rails的 时间:2015-03-15 人气:0
分享到:

相关文章

Copyright (C) 55228885.com, All Rights Reserved.

55228885 版权所有 京ICP备15002868号

processed in 0.688 (s). 10 q(s)