Routing Error During "Ruby on Rails-Tutorial"

rails 3.2.6 routing error

I just did exactly as you wrote for a new Rails 3.2.6 app, and it worked fine for me. The only step you missed was to run rake db:migrate after your scaffold generation. Try that and see if it works.

Route error in rails demo app

  1. Read error message. It says you do not have any routes. Open the recommended in error message materials and read those.

  2. add root to: 'greet#index' to routes.


Recommendation: always check error message carefully, Rails are smart enough to provide you with fully helpful hints in those.

Routing with rails 3.2.1

A member route will require an ID, because it acts on a member. A collection route doesn't because it acts on a collection of objects.

map.resources :users, :collection => { :customers_list=> :get }

map.resources :users, :member => { :inactive=> :post }

It is treated as /users/1;inactive=> [:action => 'inactive', :id => 1]

Hartl Ruby on Rails Tutorial - Chapter 8 failed test

In your routes.rb

get 'login'   => 'sessions#new'
get 'login' => 'sessions#create'

that looks weird. I guess it should be

get 'login'   => 'sessions#new'
post 'login' => 'sessions#create'


Related Topics



Leave a reply



Submit