I suggest your best plan might be to work right through a tutorial on
rails to help you to understand the basics. railstutorial.org is good
and is free to use online. Make sure that any tutorial you use is for
Rails 3 and that you use exactly the right version of rails that the
tutorial expects.
rules order in routes.rb is important: users resource 'users/:id' matches before 'users/login' so login is the id
you can invert the order of the rules or, better, use a member:
Cbapp::Application.routes.draw do
resources :users do
member do
get 'login'
end
end
root :to => 'users#index'
end