Routing error

Hi!
I’ve appended this to the standard config/routing.rb:
map.connect ‘:id/:action’, :controller => ‘cms/publish’
and it works but gives an error with every single HTTPrequest, even the
ones matching the standard (and higher priority) routes.

As an alternative I tried implementing it using
map.connect ‘*path’, :controller => ‘application’, :action =>
‘handle_req’
and the do a redirect in that function, much along the lines of the last
example in
http://www.bigbold.com/snippets/tags/routes
but I still get this error in the log (see below)

Help is greatly appreciated!
Thanks
Michael

[2006-07-20 20:26:54] ERROR Errno::EINVAL: Invalid argument
c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in
gets' c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:insend

    c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in 

_read_dat a' c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:intimeout’
c:/programmer/ruby/lib/ruby/1.8/timeout.rb:55:in timeout' c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:inread_dat
a’
c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:335:in
read_line ' c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:225:inread_requ
est_line’
c:/programmer/ruby/lib/ruby/1.8/webrick/httprequest.rb:86:in
parse' c:/programmer/ruby/lib/ruby/1.8/webrick/httpserver.rb:56:inrun’
c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:155:in
start_thread' c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:144:instart’
c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:144:in
start_thread' c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:94:instart’
c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:89:in each' c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:89:instart’
c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:79:in start' c:/programmer/ruby/lib/ruby/1.8/webrick/server.rb:79:instart’
c:/programmer/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server
.rb:67:in dispatch' c:/programmer/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/serve rs/webrick.rb:59 c:/programmer/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18: inrequire
_’
c:/programmer/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:
in require' c:/programmer/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active _support/dependencies.rb:147:inrequire’
c:/programmer/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/serve
r.rb:30
c:/programmer/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:
in require__' c:/programmer/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18: inrequire’
c:/programmer/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active
_support/dependencies.rb:147:in `require’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs