Ruby DEPRECATION WARNING: you are using an old DSL router that will be removed in Rails 3.1

I am using Rails 3, and at the moment I am writing tests for my application. I get this strange failure warning:

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) 

Of course my routes file:

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

but no luck. If I look at the place it points to in my enviroment.rb:

 WebCMS::Application.initialize! 

I did a gem cleaning without any luck. Does anyone have an idea?

ps. I am using RVM with Ruby 1.9.2

+4
source share
2 answers

With the routes file you posted, I do not get this error. Perhaps it is a gem or a plugin that you use that gives you this?

I recently updated Rails 3, and the old version of the declarative_authorization gem gave me this error.

+3
source

This usually happens when you pass | map | parameter ( see this post ). Make sure you are not passing the parameter to the block.

+4
source

Source: https://habr.com/ru/post/1333986/


All Articles