Pagination error using named routes

Hi,

I repeatedly get pagination errors (cannot convert Fixnum to String)
when using a certain order of routes. This order works fine:

map.connect ‘maerchen’, :controller => ‘pages’, :action => ‘index’,
:id => 8
map.connect ‘erzaehlungen’, :controller => ‘pages’, :action =>
‘index’, :id => 2597
map.connect ‘gedichte’, :controller => ‘pages’, :action => ‘index’,
:id => 7

map.connect ‘pages/:id.:format’, :controller => ‘pages’, :action =>
‘index’, :requirements => { :id => /\d+/ }
map.connect ‘pages/:id’, :controller => ‘pages’, :action => ‘index’,
:requirements => { :id => /\d+/ }
map.connect ‘:id’, :controller => ‘pages’, :action => ‘index’,
:requirements => { :id => /\d+/ }

I can access both http://host/gedichte http://host/7, or
http://host/pages/7 to get a nice paginated output using

<% @children_pagination.each do |page| %>
<%= link_to_unless((params[:page].to_i == page.number),
“#{(page.number20-19).to_s}-#{(page.number20).to_s}”, :page => page)
%>
<% end %>

But as soon as I move one of the non-named routes to the top, the named
URLs (http://host/gedichte) etc. throw the error above.

Why is that?

Kind regards,
Jan