运行 rake db:create 时 Arel 弃用警告

发布于 2024-12-05 23:42:31 字数 519 浏览 7 评论 0原文

我正在尝试使用 mysql2 v 0.2.6 在 Rails 3.1 中创建一个应用程序。运行 rake db:create 时,出现以下错误:

DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. 
Database adatpers should define a visitor_for method which returns the appropriate 
visitor for the database. For example, MysqlAdapter.visitor_for(pool) returns 
Arel::Visitors::MySQL.new(pool). (called from mon_synchronize at 
c:/Ruby192/lib/ruby/1.9.1/monitor.rb:201)

我可以访问 MySQL 监视器,因此 gem 似乎已正确安装。这里还会发生什么?

谢谢!

I'm trying to create an app in Rails 3.1 with mysql2 v 0.2.6. When running rake db:create, I get the following error:

DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. 
Database adatpers should define a visitor_for method which returns the appropriate 
visitor for the database. For example, MysqlAdapter.visitor_for(pool) returns 
Arel::Visitors::MySQL.new(pool). (called from mon_synchronize at 
c:/Ruby192/lib/ruby/1.9.1/monitor.rb:201)

I can access the MySQL monitor, so the gem appears to be installed correctly. What else could be going on here?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

§对你不离不弃 2024-12-12 23:42:31

尝试更新您的 msql gem。

在 ./Gemfile

gem require 'mysql2', '~> 0.3.6'

捆绑更新 mysql2

Try updating your msql gem.

In ./Gemfile

gem require 'mysql2', '~> 0.3.6'

bundle update mysql2

千年*琉璃梦 2024-12-12 23:42:31

在 gemfile 中使用下面指定的版本。

gem 'mysql2', '~>0.3.10'

然后运行

bundle install

use the below specified version in gemfile.

gem 'mysql2', '~>0.3.10'

then run

bundle install
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文