I just did a fresh install of RVM, JRuby, Rails, and MySQL, but I am having some trouble creating my databases. When I run rake db:create --trace
I get the following output:
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开发者_Python百科_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
I have no idea what could be wrong. Does anyone have any ideas?
are you using Snow Leopard?
The problem might be in Mysql version and gem flags. Remove Mysql 5.5 if you have (Mysql 5.1 is a stable version)
have a look in here rake aborted! uninitialized constant Mysql2 and here http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/
精彩评论