Recognition failed for

Hello,

I’m new to Rails so please forgive me if I’m asking any stupid
questions…

I’m trying to set up lighttpd so that is supports multiple Rails apps
(in the form of http://server/app1, http://server/app2, etc). OS:
Gentoo, 2.6.17 kernel, ruby 1.8.4, rails 1.1.6, lighttpd 1.4.11

My rails app is generated into /mnt/b/www/rails/test1/ and I’ve appended
my lighttpd configuration to the end of the message.

I’ve generated a controller called MyFeeds with nothing else in it. Now
based on every reading I’ve done, trying to access
http://server/test1/MyFeeds/ should prove somewhat successful, but all
I’m getting is 500 Application error page.

Here’s the entry from log/development.log

Recognition failed for “/test1/MyFeeds/” req.path=/test1/MyFeeds/
path=test1MyFeeds
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:522:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:512:inrecognize!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in
process!' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:600:ineach_cgi’
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in
`process!’
/mnt/b/www/rails/test1/public/dispatch.fcgi:24

I’ve slightly changed recognition_failed in routing.rb:522 to also
display the request.path as well as the path parameter that’s passed to
recognize_path.

def recognition_failed(request, path)
raise ActionController::RoutingError, “Recognition failed for
#{request.path.inspect} req.path=#{request.path} path=#{path}”
end

Where is the recognize_path function and what can I do to be able to see
why is it not recognizing the controller?

Lighttpd config section for the test1 application.

$HTTP[“url”] =~ “^/test1/” {
var.test1 = “/mnt/b/www/rails/test1”
server.document-root = test1 + “/public/”
alias.url = ( “/test1/” => test1 + “/public/” )
server.indexfiles = ( “dispatch.fcgi”, “index.html” )
server.error-handler-404 = “/dispatch.fcgi”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
(
“bin-environment” => ( “RAILS_ENV” =>
“development” ),
“bin-path” => test1 + “/public/dispatch.fcgi”,
“min-procs” => 1,
“max-procs” => 3,
“socket” => “/tmp/test1-fastcgi.socket”,
“check-local” => “disable”,
)
)
)

}

I’m thinking it cannot be this difficult to get a Rails app started, so
I must be doing something wrong… Any thoughts what that might be?

Thanks

philip

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