rails + apache2 + fcgi: Default Rails application fails with "ActionController::RoutingError (no route found to match "/" with {:method=>:get})"

Bug #126263 reported by Matej Kenda
2
Affects Status Importance Assigned to Milestone
libfcgi-ruby (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: libfcgi-ruby1.8

I was setting up the environment for developing Ruby on Rails applications.

The howtos recommend setting apache2 server with fcgi to improve the performance of RoR applications.

I followed the instructions from various places. All of the instructions on the net are similar to each other. I was not able to find the reason for the behaviour that is happening on my computer.

The overview of my setup is logged in https://wiki.ubuntu.com/MatejKenda/RubyOnRails.

I have installed everything that is required to run RoR applications via Apache2 + fcgi using apt.

After creating an empty rails application the default rails page displays if the fcgi is disabled. As soon as I enable the fcgi, the page displays only:

ActionController::RoutingError
no route found to match "/" with {:method=>:get}

The development.log contains the following log:

ActionController::RoutingError (no route found to match "/" with {:method=>:get}):
    /vendor/rails/actionpack/lib/action_controller/routing.rb:1266:in `recognize_path'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:1256:in `recognize'
    /vendor/rails/railties/lib/dispatcher.rb:40:in `dispatch'
    /vendor/rails/railties/lib/fcgi_handler.rb:168:in `process_request'
    /vendor/rails/railties/lib/fcgi_handler.rb:143:in `process_each_request!'
    /vendor/rails/railties/lib/fcgi_handler.rb:109:in `with_signal_handler'
    /vendor/rails/railties/lib/fcgi_handler.rb:142:in `process_each_request!'
    /usr/lib/ruby/1.8/fcgi.rb:612:in `each_cgi'
    /usr/lib/ruby/1.8/fcgi.rb:609:in `each'
    /usr/lib/ruby/1.8/fcgi.rb:609:in `each_cgi'
    /vendor/rails/railties/lib/fcgi_handler.rb:141:in `process_each_request!'
    /vendor/rails/railties/lib/fcgi_handler.rb:55:in `process!'
    /vendor/rails/railties/lib/fcgi_handler.rb:25:in `process!'
    /home/proj/klub-goryu/goryu-is/klub-is/public/dispatch.fcgi:24

Output of ruby -d dispatch.fcgi contains statements of various missing files. Many of those files are installed (e.g. html/tokenizer), some are not.

Revision history for this message
Matej Kenda (matejken) wrote :

Solved the problem by myself (it was not a bug at all). RewriteRule in .htaccess for fcgi was specified twice by mistake.

Changed in libfcgi-ruby:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.