Skip to content

Instantly share code, notes, and snippets.

@afriqs
Last active August 29, 2015 13:57
Show Gist options
  • Save afriqs/9689530 to your computer and use it in GitHub Desktop.
Save afriqs/9689530 to your computer and use it in GitHub Desktop.
[Fri Mar 21 16:56:31 2014] [info] mod_fcgid: server app.domain.tld:/path/to/rails/root/current/public/dispatch.fcgi(3478208) started
/path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:461:in `load_missing_constant': Circular dependency detected while autoloading constant Manager (RuntimeError)
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:184:in `const_missing'
from /path/to/rails/root/releases/20140321092310/app/admin/manager.rb:1:in `<top (required)>'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:424:in `load'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:424:in `block in load_file'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:616:in `new_constants_in'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:423:in `load_file'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:324:in `require_or_load'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:463:in `load_missing_constant'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:184:in `const_missing'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/inflector/methods.rb:226:in `const_get'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/inflector/methods.rb:226:in `block in constantize'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/inflector/methods.rb:224:in `each'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/inflector/methods.rb:224:in `inject'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/inflector/methods.rb:224:in `constantize'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:535:in `get'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:566:in `constantize'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise.rb:297:in `get'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/mapping.rb:77:in `to'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/mapping.rb:72:in `modules'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/mapping.rb:89:in `routes'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/mapping.rb:156:in `default_used_route'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/mapping.rb:66:in `initialize'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise.rb:331:in `new'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise.rb:331:in `add_mapping'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/rails/routes.rb:221:in `block in devise_for'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `each'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `devise_for'
from /path/to/rails/root/releases/20140321092310/config/routes.rb:3:in `block in <top (required)>'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.4/lib/action_dispatch/routing/route_set.rb:335:in `instance_exec'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.4/lib/action_dispatch/routing/route_set.rb:335:in `eval_block'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.4/lib/action_dispatch/routing/route_set.rb:313:in `draw'
from /path/to/rails/root/releases/20140321092310/config/routes.rb:1:in `<top (required)>'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:223:in `load'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:223:in `block in load'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:223:in `load'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/routes_reloader.rb:40:in `each'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/file_update_checker.rb:75:in `call'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/file_update_checker.rb:75:in `execute'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/routes_reloader.rb:27:in `updater'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `instance_exec'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `run'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/initializable.rb:54:in `run_initializers'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application.rb:215:in `initialize!'
from /path/to/rails/root/shared/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /path/to/rails/root/current/config/environment.rb:5:in `<top (required)>'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /path/to/home/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /path/to/rails/root/current/public/dispatch.fcgi:8:in `<main>'
[Fri Mar 21 16:56:32 2014] [warn] [client 82.251.181.203] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Fri Mar 21 16:56:32 2014] [error] [client 82.251.181.203] Premature end of script headers: dispatch.fcgi
[Fri Mar 21 16:56:37 2014] [info] mod_fcgid: process /path/to/rails/root/current/public/dispatch.fcgi(3478208) exit(communication error), terminated by calling exit(), return code: 1
#!/home/user/.rbenv/versions/2.1.0/bin/ruby
require 'rubygems'
require 'fcgi'
ENV['RAILS_ENV'] ||= 'testing'
require File.join(File.dirname(__FILE__), '../config/environment')
class Rack::PathInfoRewriter
def initialize(app)
@app = app
end
def call(env)
env.delete('SCRIPT_NAME')
parts = env['REQUEST_URI'].split('?')
env['PATH_INFO'] = parts[0]
env['QUERY_STRING'] = parts[1].to_s
@app.call(env)
end
end
Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(MyApp::Application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment