This project is archived and is in readonly mode.

#4233 ✓resolved
David Chelimsky

"rails g controller" does not generate any routes

Reported by David Chelimsky | March 19th, 2010 @ 01:07 PM | in 3.0.2

The controller generator does not provide any routes.

Steps to reproduce:

rails example
cd example
rails g controller things index

Now add the following test to test/functionals/things_controller_test.rb:

test "GET index" do
  get :index
end

Running this test produces:

  1) Error:
test_GETs_index(ThingsControllerTest):
ActionController::RoutingError: No route matches {:controller=>"things"}

This is because the generator does not provide any routes.

This is true of rails 3.0.0.beta and the current HEAD in git (0aa0c37b59077d3f8b0d43c4d5faf86d40949f5f).

Not sure if this matters, but: Running Ruby-1.8.7-p249 on mac os-x (snow leopard).

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages