gpt4 book ai didi

ruby-on-rails - ruby 弃用警告 : You are using the old router DSL which will be removed in Rails 3. 1

转载 作者:数据小太阳 更新时间:2023-10-29 07:27:40 24 4
gpt4 key购买 nike

我正在使用 Rails 3,目前正在为我的应用程序编写测试。我收到这个奇怪的弃用警告:

DEPRECATION WARNING: You are using the old router DSL which will be removed in Rails 3.1. Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/. (called from <top (required)> at /Users/jeljer/Dropbox/webCMS/config/environment.rb:6)

当然我的路由文件是这样的:

WebCMS::Application.routes.draw do
#...
end

但运气不好。如果我查看它在我的 enviroment.rb 中指向的位置:

WebCMS::Application.initialize!

我没有任何运气地做了一个 gem 清理。有人有想法吗?

附言。我在 Ruby 1.9.2 中使用 RVM

最佳答案

这通常发生在您通过 |map| 时参数(see this post)。确保您没有将参数传递给 block 。

关于ruby-on-rails - ruby 弃用警告 : You are using the old router DSL which will be removed in Rails 3. 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4578798/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com