Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Rails 3.2 exception recommends rails_legacy_mapper, which isn't compatible with Rails 3.2 #5022

johndouthat opened this Issue · 4 comments

4 participants


I'm upgrading an app from Rails 2.3 to 3.2 and I encountered this error message:

You are using the old router DSL which has been removed in Rails 3.1. Please check how to update your routes file at: or add the rails_legacy_mapper gem to your Gemfile

The error message is defined here

However, that gem requires Rails 3.1 according to its gemspec

Someone forked the repo and updated the gemspec, but I installed that version and got the following error message instead:

/Users/john/.bundler/ruby/1.9.1/rails_legacy_mapper-1a2183189567/lib/rails_legacy_mapper/mapper.rb:78:in `connect': uninitialized constant Rack::Mount (NameError)
    from /Users/john/.bundler/ruby/1.9.1/rails_legacy_mapper-1a2183189567/lib/rails_legacy_mapper/mapper.rb:157:in `named_route'
    from /Users/john/.bundler/ruby/1.9.1/rails_legacy_mapper-1a2183189567/lib/rails_legacy_mapper/mapper.rb:170:in `method_missing'
    from /path_to_my_app/config/routes.rb:4:in `block in <top (required)>'

I'm going to stop being lazy, and update my routes.rb, but the error message should be updated for others' sake, so they don't try to use the incompatible gem.


A workaround for the issue is to set the :require option for rack-mount)

gem 'rails_legacy_mapper', :git => 'git://'
gem 'rack-mount', :require => 'rack/mount'

The rails_legacy_mapper was really only for people get an old app up and running quickly on 3.1 which removed support for the old DSL - it was not intended to be a long term option. Since Rails 3.2 has switched from Rack::Mount to Journey it was always likely to fail.

If someone can send me a pull request for adding 3.2 support I'll release a new version, however I'd recommend switching to the new DSL - it shouldn't take more than an hour even for the largest of routes.rb files


I totally agree with @pixeltrix, can we close this?


@drogus please close it. We removed the reference to rails_lagacy_mapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.