Newbie question: Routing Issues since rails version update?

Hi there I wrote a small rails app for my university dept about a year
so ago to deal with mailing list generation and display of staff details
and all was working fine up until last week when we did a version
Im not someone who uses rails regularly and so Im a bit at a loss.

The normal functionality search and display of the rails program is
it searches and diplays user deatails without issues, but however when I
try to “logon” to a session as the administrator to add a new user I get
the following error:

ActiveRecord::RecordNotFound in UsersController#show

Couldn’t find User with ID=login

RAILS_ROOT: /export/webserver/raid/htdocs/users
Application Trace |
Trace | Full

find_one' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:1603:in find_from_ids’
find' /export/cree/raid/htdocs/users/app/controllers/users_controller.rb:33:in show’




Show session dump



So this appears to be an issue with routes.rb or some other issue of
routing? I have not changed any of the routing configuration files at
and the format appears to comply with the current standards.

It looks tome like the directives

map.login ‘/login’, :controller => ‘sessions’, :action => ‘new’
map.logout ‘/logout’, :controller => ‘sessions’, :action => ‘destroy’

Are not working? And rails is trying to interpret “login” as if it were
just another database row

Here is the routes.rb file

ActionController::Routing::Routes.draw do |map|
map.resources :users, :sessions

The priority is based upon order of creation: first created →


Sample of regular route:

map.connect ‘products/:id’, :controller => ‘catalog’, :action =>


Keep in mind you can assign values other than :controller and


Sample of named route:

map.purchase ‘products/:id/purchase’, :controller => ‘catalog’,

:action => ‘purchase’

This route can be invoked with purchase_url(:id =>

Sample resource route (maps HTTP verbs to controller actions


map.resources :products

Sample resource route with options:

map.resources :products, :member => { :short => :get, :toggle =>

:post }, :collection => { :sold => :get }

Sample resource route with sub-resources:

map.resources :products, :has_many => [ :comments, :sales ],

=> :seller

Sample resource route within a namespace:

map.namespace :admin do |admin|

# Directs /admin/products/* to Admin::ProductsController


admin.resources :products


You can have the root of your site routed with map.root – just

remember to delete public/index.html.
map.root :controller => “users”

See how all your routes lay out with “rake routes”

Install the default routes as the lowest priority.

map.connect ‘:controller/:action/:id’
map.connect ‘:controller/:action/:id.:format’
map.login ‘/login’, :controller => ‘sessions’, :action => ‘new’
map.logout ‘/logout’, :controller => ‘sessions’, :action => ‘destroy’

Previous Versions:
Rails version 2.2.3
Ruby version 1.8.6

New Versions:
Rails version 2.3.14
Ruby version 1.8.7

As Is ai Im not a day to day RoR programmer so any help or advice would
gratefully accepted.

Can you show us the code from the method show from this controller?


Here it is… the normal display index and “show” functionality still

GET /users/1

GET /users/1.xml

def show

require 'curb'

@user = User.find(params[:id])

if File.exist?



  constructedurl ={@user.Personal_Web}/userdetails.html
userurl = Curl::Easy.perform(constructedurl)
@userwebdetails = userurl.body_str

  @userwebdetails = "No User Details Found"


if [email protected]?
@CentaurUIDValue = @user.CentaurUID
@CentaurUIDValue = @CentaurUIDValue.gsub(".", "=2E")
@CentaurUIDValue = @CentaurUIDValue.gsub("@", "=40")
@CentaurURLValue =

Browse by Creator - CentAUR
@CentaurURL = Curl::Easy.perform(@CentaurURLValue)
@CentaurDetails = @CentaurURL.body_str

respond_to do |format|
  format.html # show.html.erb
  format.xml  { render :xml => @user }


On Thursday, September 20, 2012 11:13:54 AM UTC+1, DDale wrote:

You can have the root of your site routed with map.root – just

remember to delete public/index.html.
map.root :controller => “users”

I wonder if doing map.root and specifying only a controller (but not an
action) does weird stuff. I’d try either changing this to add the
appropriate action or move your login/logout routes higher up


In the logs I am seeing this, could this be the key? (pardon the pun)

"DEPRECATION WARNING: Giving :session_key to SessionStore is deprecated,
please use :key instead. (called from new at