嗨朋友们在这里做一些问题当我在做rake db:create时 我收到这样的错误
DEPRECATION WARNING: railtie_name is deprecated and has no effect. (called from <class:Engine> at /home/shajin/.rvm/gems/ruby-1.9.2-p0/bundler/gems/spree_paypal_express-073f2f814dd8/lib/spree_paypal_express.rb:5)
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /home/shajin/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method Soletronspree::Application#task called at /home/shajin/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.7/lib/rails/application.rb:215:in `initialize_tasks'
WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead.
at /home/shajin/.rvm/gems/ruby-1.9.2-p0/gems/deface-0.5.2a/tasks/deface.rake:3:in `block in <top (required)>'
rake aborted!
!!! Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
提前致谢
答案 0 :(得分:0)
您已在config/database.yml
文件中指定使用MySQL适配器连接到数据库,但您未在Gemfile和/或gem中包含mysql2
gem未在您的应用中安装。
在错误消息的底部显示:
!!! Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2'
那是你的问题。