chimpchamp/chimpactions — Issue #3: rails g chimpactions:install gives error due to using the old Routing DSL
Author: geoffd123
Created: 2012-03-07 19:45:46+00:00
State: open

Running rails g chimpaactions on Rails 3.1.3 gives an error:

```

/Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:252:in `eval_block': You are using the old router DSL which has been 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/ or add the rails_legacy_mapper gem to your Gemfile (RuntimeError)
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:235:in `draw'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/chimpactions-0.0.4/config/routes.rb:1:in `'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `block in load'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:29:in `block in load_paths'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:29:in `each'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:29:in `load_paths'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:13:in `reload!'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:7:in `block in initialize'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/file_update_checker.rb:32:in `call'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/finisher.rb:63:in `block (2 levels) in '
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/finisher.rb:64:in `call'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application/finisher.rb:64:in `block in '
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/geoffd/projects/rails31/contactogram/config/environment.rb:5:in `'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'
from /Users/geoffd/.rvm/gems/ruby-1.9.3-p0@contactogram/gems/railties-3.1.3/lib/rails/commands.rb:22:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'
'''

I have used the workaround of installing the rails_legacy_mapper gem for now.