ActionController::RoutingError (No route matches "*" with {:method=>:options}):

Added by Matthew Rupert over 8 years ago

Redmine is configured and running just fine, but when I take a look at production.log I see that there are some problems. The strange thing is this error isn't logged when I click a page--It appears after a few seconds of inactivity. Any advice?

Rendering /opt/redmine-1.1.2/public/404.html (404 Not Found)

Processing ApplicationController#index (for ::1 at 2011-03-15 14:46:03) [OPTIONS]

ActionController::RoutingError (No route matches "*" with {:method=>:options}):
/opt/redmine/public/dispatch.fcgi:24

Rendering /opt/redmine-1.1.2/public/404.html (404 Not Found)

Processing ApplicationController#index (for ::1 at 2011-03-15 14:46:04) [OPTIONS]

ActionController::RoutingError (No route matches "*" with {:method=>:options}):
/opt/redmine/public/dispatch.fcgi:24

Rendering /opt/redmine-1.1.2/public/404.html (404 Not Found)

Processing AccountController#login (for 10.75.188.64 at 2011-03-15 14:47:56) [POST]
Parameters: {"action"=>"login", "authenticity_token"=>"LiBnA/C4V+Wi6BlwloPlTXn48U6q5HZ2iFaCAGeqPbw=", "username"=>"admin", "controller"=>"account", "password"=>"[FILTERED]", "login"=>"Login »"}
Redirected to http://uslzt50x/my/page
Completed in 18ms (DB: 10) | 302 Found [http://uslzt50x/login]

"production.log" 435L, 14218C

Replies (13)

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): - Added by Matthew Rupert over 8 years ago

That's what I'm thinking, but not sure what. when I get the error I get this in my access log at the same time:

[15/Mar/2011:15:17:37 -0400] "GET /javascripts/effects.js?1299527081 HTTP/1.1" 304 -
[15/Mar/2011:15:17:37 -0400] "GET /javascripts/dragdrop.js?1299527081 HTTP/1.1" 304 -
[15/Mar/2011:15:17:37 -0400] "GET /javascripts/application.js?1299527081 HTTP/1.1" 304 -
[15/Mar/2011:15:17:37 -0400] "GET /stylesheets/jstoolbar.css?1299527081 HTTP/1.1" 304 -
[15/Mar/2011:15:17:37 -0400] "GET /javascripts/controls.js?1299527081 HTTP/1.1" 304 -
[15/Mar/2011:15:17:37 -0400] "GET /images/news.png HTTP/1.1" 304 -
[15/Mar/2011:15:17:37 -0400] "GET /images/projects.png HTTP/1.1" 304 -
::1 - - [15/Mar/2011:15:17:44 -0400] "OPTIONS * HTTP/1.0" 404 484
::1 - - [15/Mar/2011:15:17:45 -0400] "OPTIONS * HTTP/1.0" 404 484
::1 - - [15/Mar/2011:15:17:46 -0400] "OPTIONS * HTTP/1.0" 404 484

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): - Added by Matthew Rupert over 8 years ago

I'm still struggling with this error. Here is some further detail , just in case anyone happens to see anything that I don't. Thanks!!!!

Processing AccountController#login (for 10.75.188.64 at 2011-03-16 09:47:06) [GET]
Parameters: {"action"=>"login", "controller"=>"account"}
Rendering template within layouts/base
Rendering account/login
Completed in 10ms (View: 6, DB: 2) | 200 OK [http://uslzt50x/login]

Processing ApplicationController#index (for ::1 at 2011-03-16 09:47:15) [OPTIONS]

ActionController::RoutingError (No route matches "*" with {:method=>:options}):
vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb:66:in `recognize_path'
vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:441:in `recognize'
vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:436:in `call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in `_call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in `cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in `call'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'
rack (1.0.1) lib/rack/head.rb:9:in `call'
rack (1.0.1) lib/rack/methodoverride.rb:24:in `call'
vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in `call'
vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in `call'
vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in `call'
rack (1.0.1) lib/rack/lock.rb:11:in `call'
rack (1.0.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.0.1) lib/rack/lock.rb:11:in `call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in `call'
rack (1.0.1) lib/rack/content_length.rb:13:in `call'
rack (1.0.1) lib/rack/handler/fastcgi.rb:58:in `serve'
vendor/rails/railties/lib/fcgi_handler.rb:103:in `process_request'
vendor/rails/railties/lib/fcgi_handler.rb:153:in `with_signal_handler'
vendor/rails/railties/lib/fcgi_handler.rb:101:in `process_request'
vendor/rails/railties/lib/fcgi_handler.rb:78:in `process_each_request'
vendor/rails/railties/lib/fcgi_handler.rb:77:in `each'
vendor/rails/railties/lib/fcgi_handler.rb:77:in `process_each_request'
vendor/rails/railties/lib/fcgi_handler.rb:76:in `catch'
vendor/rails/railties/lib/fcgi_handler.rb:76:in `process_each_request'
vendor/rails/railties/lib/fcgi_handler.rb:51:in `process!'
vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
/opt/redmine/public/dispatch.fcgi:24

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): - Added by Matthew Rupert over 8 years ago

I don't get this error when using Webrick, by the way. Only with Phusion/Apache

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): - Added by Matthew Rupert over 8 years ago

SetEnv RAILS_ENV production
SetEnv PASSENGER_TMPDIR /etc/httpd/passenger_tmp

<IfModule mod_fastcgi.c>
    FastCgiIpcDir /tmp/fcgi_ipc/
    AddHandler fastcgi-script .fcgi
</IfModule>

FastCgiServer /opt/redmine/public/dispatch.fcgi -idle-timeout 120 -initial-env RAILS_ENV=production -initial-env PATH=/usr/local/bin -processes 2

# Passenger
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.5/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.5
PassengerRuby /usr/local/bin/ruby
PassengerDefaultUser apache
PassengerAnalyticsLogUser apache
PassengerMaxPoolSize 2
PassengerPoolIdleTime 144
PassengerMaxInstancesPerApp 4
RailsAutoDetect off

<Directory />
    AllowOverride None
</Directory>

NameVirtualHost *:80

<VirtualHost *:80>
    RailsSpawnMethod conservative
    RailsEnv production
    RailsBaseURI /redmine
    #Alias /redmine /opt/redmine/public
    PassengerMinInstances 1
    PassengerHighPerformance on
    DocumentRoot /opt/redmine/public/
    ErrorLog /opt/redmine/log/redmine_http_error_log
    <Directory "/opt/redmine/public/">
        Options +ExecCGI +FollowSymLinks -MultiViews
        AddHandler fastcgi-script fcgi
        Order allow,deny
        Allow from all
        AllowOverride None
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ dispatch.fcgi
    </Directory>
</VirtualHost>

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): - Added by Etienne Massip over 8 years ago

Seems that there is a client somewhere bothering you with OPTIONS requests.

You can add a RewriteCond / RewriteRule directive pair to disallow OPTIONS requests :

RewriteCond %{REQUEST_METHOD} ^OPTIONS
RewriteRule .* - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): - Added by Matthew Rupert over 8 years ago

Strange. Could this be something screwy on the network?

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): - Added by Etienne Massip over 8 years ago

Matthew Rupert wrote:

Strange. Could this be something screwy on the network?

Really no idea :/

Rails 1.0.1

Looks like a Rack version to me =)

RE: ActionController::RoutingError (No route matches "*" with {:method=>:options}): : RESOLVED - Added by Matthew Rupert over 8 years ago

Thanks... I added the Apache config lines suggested above and it seems to work fine.

(1-13/13)